浏览代码

Fixed shadowmap leaking.

/2018.1
Felipe Lira 7 年前
当前提交
c9ac4b4d
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 11
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

11
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


if (sceneViewCamera)
CopyTexture(cmd, CameraRenderTargetID.depth, BuiltinRenderTextureType.CameraTarget, m_CopyDepthMaterial, true);
#endif
if (m_ShadowMapRT)
{
cmd.ReleaseTemporaryRT(m_ShadowMapRTID);
m_ShadowMapRT = null;
}
cmd.ReleaseTemporaryRT(m_ScreenSpaceShadowMapRTID);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.depthCopy);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.depth);

CommandBufferPool.Release(cmd);
context.Submit();
if (m_ShadowMapRT)
{
RenderTexture.ReleaseTemporary(m_ShadowMapRT);
m_ShadowMapRT = null;
}
}
}

正在加载...
取消
保存