浏览代码

Fixed issue that was causing a copyDepth pass to be called even when a depth from prepass is available.

/main
Felipe Lira 6 年前
当前提交
7a610fcd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs

2
com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs


bool requiresDepthAttachment = requiresCameraDepth && !requiresDepthPrepass;
bool requiresColorAttachment = RequiresIntermediateColorTexture(ref renderingData.cameraData, baseDescriptor, requiresDepthAttachment);
int[] colorHandles = (requiresColorAttachment) ? new[] {RenderTargetHandles.Color} : null;
int depthHandle = (requiresColorAttachment) ? RenderTargetHandles.DepthAttachment : -1;
int depthHandle = (requiresDepthAttachment) ? RenderTargetHandles.DepthAttachment : -1;
EnqueuePass(cmd, RenderPassHandles.ForwardLit, baseDescriptor, colorHandles, depthHandle, renderingData.cameraData.msaaSamples);
context.ExecuteCommandBuffer(cmd);

正在加载...
取消
保存