浏览代码

Merge branch 'kgdev' into 'master'

fix the case where antiAliasing is 0 (disabled).

See merge request upm-packages/ui-widgets/com.unity.uiwidgets!59
/main
Shenhua Gu 6 年前
当前提交
ed608a94
共有 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);
}
}

正在加载...
取消
保存