浏览代码

fix canvas set render target.

/main
kg 6 年前
当前提交
0085711c
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 12
      Runtime/ui/painting/canvas_impl.cs

12
Runtime/ui/painting/canvas_impl.cs


void _drawLayer(RenderLayer layer, CommandBuffer cmdBuf) {
if (layer.rtID == 0) {
cmdBuf.SetRenderTarget(this._renderTexture,
RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
cmdBuf.SetRenderTarget(this._renderTexture);
cmdBuf.SetRenderTarget(layer.rtID,
RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
cmdBuf.SetRenderTarget(layer.rtID);
cmdBuf.ClearRenderTarget(true, true, UnityEngine.Color.clear);
}

this._drawLayer(subLayer, cmdBuf);
if (layer.rtID == 0) {
cmdBuf.SetRenderTarget(this._renderTexture,
RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
cmdBuf.SetRenderTarget(this._renderTexture);
cmdBuf.SetRenderTarget(layer.rtID,
RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
cmdBuf.SetRenderTarget(layer.rtID);
}
break;

正在加载...
取消
保存