|
|
|
|
|
|
|
|
|
|
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; |
|
|
|