浏览代码

Use the same command buffer for both begin and end sample

/main
Robert Srinivasiah 7 年前
当前提交
045a8891
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

10
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


m_CurrCamera = camera;
m_IsOffscreenCamera = m_CurrCamera.targetTexture != null && m_CurrCamera.cameraType != CameraType.SceneView;
var profilingCmd = CommandBufferPool.Get("");
profilingCmd.BeginSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(profilingCmd);
CommandBufferPool.Release(profilingCmd);
var cmd = CommandBufferPool.Get("");
cmd.BeginSample("LightweightPipeline.Render");
context.ExecuteCommandBuffer(cmd);
cmd.Clear();
ScriptableCullingParameters cullingParameters;
if (!CullResults.GetCullingParameters(m_CurrCamera, stereoEnabled, out cullingParameters))

ForwardPass(visibleLights, frameRenderingConfiguration, ref context, ref lightData, stereoEnabled);
var cmd = CommandBufferPool.Get("After Camera Render");
cmd.name = "After Camera Render";
#if UNITY_EDITOR
if (sceneViewCamera)
CopyTexture(cmd, CameraRenderTargetID.depth, BuiltinRenderTextureType.CameraTarget, m_CopyDepthMaterial, true);

正在加载...
取消
保存