浏览代码

Fixed command buffer unmatching warning.

/2018.1
Felipe Lira 7 年前
当前提交
71f243c0
共有 1 个文件被更改,包括 2 次插入12 次删除
  1. 14
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

14
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


m_CurrCamera = camera;
m_IsOffscreenCamera = m_CurrCamera.targetTexture != null && m_CurrCamera.cameraType != CameraType.SceneView;
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);

正在加载...
取消
保存