|
|
|
|
|
|
m_VolumetricLightingModule.Build(asset); |
|
|
|
|
|
|
|
m_DebugDisplaySettings.RegisterDebug(); |
|
|
|
#if UNITY_EDITOR
|
|
|
|
// We don't need the debug of Default camera at runtime (each camera have its own debug settings)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
m_DebugColorPickerRT = HDShaderIDs._DebugColorPickerTexture; |
|
|
|
m_DebugFullScreenTempRT = HDShaderIDs._DebugFullScreenTexture; |
|
|
|
|
|
|
var texHeight = desc.height; |
|
|
|
var sampleCount = desc.msaaSamples; |
|
|
|
|
|
|
|
bool resolutionChanged = (texWidth != m_CurrentWidth) || |
|
|
|
(texHeight != m_CurrentHeight) || |
|
|
|
bool resolutionChanged = (texWidth != m_CurrentWidth) || |
|
|
|
(texHeight != m_CurrentHeight) || |
|
|
|
(sampleCount != m_CurrentMSAASampleCount); |
|
|
|
|
|
|
|
if (resolutionChanged || m_CameraDepthStencilBuffer == null) |
|
|
|
|
|
|
{ |
|
|
|
m_DbufferManager.Resize(hdCamera); |
|
|
|
m_DbufferManager.Resize(hdCamera); |
|
|
|
} |
|
|
|
|
|
|
|
if (m_FrameSettings.enableSubsurfaceScattering) |
|
|
|
|
|
|
CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetGBuffers(), m_CameraDepthStencilBufferRT); |
|
|
|
if (m_FrameSettings.enableDBuffer) |
|
|
|
{ |
|
|
|
m_DbufferManager.SetHTile(m_GbufferManager.gbufferCount, cmd); |
|
|
|
m_DbufferManager.SetHTile(m_GbufferManager.gbufferCount, cmd); |
|
|
|
} |
|
|
|
|
|
|
|
// Render opaque objects into GBuffer
|
|
|
|