|
|
|
|
|
|
} |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |