浏览代码

Use helper function to turn stereo drawing on/off

/main
Robert Srinivasiah 7 年前
当前提交
50a1c71f
共有 1 个文件被更改,包括 21 次插入17 次删除
  1. 38
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

38
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


}
ConfigureForShadowMask(enableBakeShadowMask, cmd);
if (m_FrameSettings.enableStereo)
renderContext.StartMultiEye(hdCamera.camera);
StartStereoRendering(renderContext, hdCamera.camera);
ClearBuffers(hdCamera, cmd);

RenderPyramidDepth(hdCamera, cmd, renderContext, FullScreenDebugMode.DepthPyramid);
if (m_FrameSettings.enableStereo)
renderContext.StopMultiEye(hdCamera.camera);
StopStereoRendering(renderContext, hdCamera.camera);
if (m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled())
{

}
else
{
if (m_FrameSettings.enableStereo)
renderContext.StartMultiEye(hdCamera.camera);
StartStereoRendering(renderContext, hdCamera.camera);
using (new ProfilingSample(cmd, "Render SSAO", CustomSamplerId.RenderSSAO.GetSampler()))
{

}
}
if (m_FrameSettings.enableStereo)
renderContext.StopMultiEye(hdCamera.camera);
StopStereoRendering(renderContext, hdCamera.camera);
GPUFence buildGPULightListsCompleteFence = new GPUFence();
if (m_FrameSettings.enableAsyncCompute)

RenderDeferredLighting(hdCamera, cmd);
// Might float this higher if we enable stereo w/ deferred
if (m_FrameSettings.enableStereo)
renderContext.StartMultiEye(hdCamera.camera);
StartStereoRendering(renderContext, hdCamera.camera);
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);
RenderForwardError(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);

AccumulateDistortion(m_CullResults, hdCamera, renderContext, cmd);
RenderDistortion(cmd, m_Asset.renderPipelineResources, hdCamera);
if (m_FrameSettings.enableStereo)
renderContext.StopMultiEye(hdCamera.camera);
StopStereoRendering(renderContext, hdCamera.camera);
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, hdCamera, FullScreenDebugMode.NanTracker);
PushColorPickerDebugTexture(cmd, m_CameraColorBuffer, hdCamera);

if (m_FrameSettings.enableStereo)
renderContext.StartMultiEye(hdCamera.camera);
StartStereoRendering(renderContext, hdCamera.camera);
// Final blit
if (m_FrameSettings.enablePostprocess && CoreUtils.IsPostProcessingActive(postProcessLayer))

}
}
StopStereoRendering(renderContext, hdCamera.camera);
// Pushes to XR headset and/or display mirror
{
renderContext.StopMultiEye(hdCamera.camera);
}
}

}
// END TEMP
}
}
void StartStereoRendering(ScriptableRenderContext renderContext, Camera cam)
{
if (m_FrameSettings.enableStereo)
renderContext.StartMultiEye(cam);
}
void StopStereoRendering(ScriptableRenderContext renderContext, Camera cam)
{
if (m_FrameSettings.enableStereo)
renderContext.StopMultiEye(cam);
}
}
}
正在加载...
取消
保存