浏览代码

Fix for the unmatching command buffer message

/main
Felipe Lira 7 年前
当前提交
421fd93d
共有 1 个文件被更改,包括 2 次插入13 次删除
  1. 15
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

15
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


SetupPerCameraShaderConstants();
RenderPipeline.BeginCameraRendering(m_CurrCamera);
var cmd = CommandBufferPool.Get("");
cmd.BeginSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(cmd);
cmd.Clear();
{
cmd.EndSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
}
var cmd = CommandBufferPool.Get("");
cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance,
m_CurrCamera.farClipPlane);

cmd.ReleaseTemporaryRT(CameraRenderTargetID.depth);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.color);
cmd.ReleaseTemporaryRT(CameraRenderTargetID.copyColor);
cmd.EndSample("LightweightPipeline.Render");
if (m_ShadowMapRT)
{
RenderTexture.ReleaseTemporary(m_ShadowMapRT);

正在加载...
取消
保存