浏览代码

fix the case where antiAliasing is 0 (disabled).

/main
kg 6 年前
当前提交
97792dd0
共有 2 个文件被更改,包括 12 次插入4 次删除
  1. 11
      Runtime/ui/painting/canvas_impl.cs
  2. 5
      Tests/Editor/CanvasAndLayers.cs

11
Runtime/ui/painting/canvas_impl.cs


void _drawLayer(RenderLayer layer, CommandBuffer cmdBuf) {
foreach (var subLayer in layer.layers) {
cmdBuf.GetTemporaryRT(subLayer.rtID, new RenderTextureDescriptor(
var desc = new RenderTextureDescriptor(
msaaSamples = QualitySettings.antiAliasing,
}, FilterMode.Bilinear);
};
if (QualitySettings.antiAliasing != 0) {
desc.msaaSamples = QualitySettings.antiAliasing;
}
cmdBuf.GetTemporaryRT(subLayer.rtID, desc, FilterMode.Bilinear);
this._drawLayer(subLayer, cmdBuf);
}

5
Tests/Editor/CanvasAndLayers.cs


width,
height,
RenderTextureFormat.Default, 24) {
msaaSamples = QualitySettings.antiAliasing,
if (QualitySettings.antiAliasing != 0) {
desc.msaaSamples = QualitySettings.antiAliasing;
}
this._renderTexture = RenderTexture.GetTemporary(desc);
}
}

正在加载...
取消
保存