浏览代码

PostProcess stack will handle cases where src = dest are same and a single effect is on stack.

/main
Felipe Lira 6 年前
当前提交
1a4378d1
共有 1 个文件被更改,包括 1 次插入12 次删除
  1. 13
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/ForwardLitPass.cs

13
ScriptableRenderPipeline/LightweightPipeline/LWRP/Passes/ForwardLitPass.cs


{
CommandBuffer cmd = CommandBufferPool.Get("Render Opaque PostProcess Effects");
RenderTargetIdentifier source;
// If have a single opaque postfx we need to create a temp texture as otherwise source and target
// would be the same
if (cameraData.postProcessLayer.sortedBundles[PostProcessEvent.BeforeTransparent].Count == 1)
{
// TODO:
// cmd.GetTemporaryRT();
source = GetSurface(colorAttachmentHandle);
}
else
source = GetSurface(colorAttachmentHandle);
RenderTargetIdentifier source = GetSurface(colorAttachmentHandle);
LightweightPipeline.RenderPostProcess(cmd, renderer.postProcessRenderContext, ref cameraData, m_ColorFormat, source, GetSurface(colorAttachmentHandle), true);
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);

正在加载...
取消
保存