RenderSky ( hdCamera , cmd ) ;
RenderTransparentDepthPrepass ( m_CullResults , hdCamera , renderContext , cmd ) ;
// Render pre refraction objects
RenderForward ( m_CullResults , hdCamera , renderContext , cmd , ForwardPass . PreRefraction ) ;
RenderForwardError ( m_CullResults , hdCamera , renderContext , cmd ) ;
// Fill depth buffer to reduce artifact for transparent object during postprocess
RenderTransparentDepthPostpass ( m_CullResults , hdCamera , renderContext , cmd , ForwardPass . Transparent ) ;
RenderTransparentDepthPostpass ( m_CullResults , hdCamera , renderContext , cmd ) ;
RenderColorPyramid ( hdCamera , cmd , renderContext , false ) ;
RenderOpaqueRenderList ( cull , hdCamera , renderContext , cmd , m_DepthForwardOnlyPassNames , 0 , HDRenderQueue . k_RenderQueue_AllOpaque ) ;
}
}
if ( hdCamera . frameSettings . enableTransparentPrepass )
{
// Render transparent depth prepass after opaque one
using ( new ProfilingSample ( cmd , "Transparent Depth Prepass" , CustomSamplerId . TransparentDepthPrepass . GetSampler ( ) ) )
{
RenderTransparentRenderList ( cull , hdCamera , renderContext , cmd , m_TransparentDepthPrepassNames ) ;
}
}
}
// RenderGBuffer do the gbuffer pass. This is solely call with deferred. If we use a depth prepass, then the depth prepass will perform the alpha testing for opaque apha tested and we don't need to do it anymore
{
drawSettings . SetShaderPassName ( 0 , HDShaderPassNames . s_MeshDecals3RTName ) ;
}
FilterRenderersSettings filterRenderersSettings = new FilterRenderersSettings ( true )
{
renderQueueRange = HDRenderQueue . k_RenderQueue_AllOpaque
}
}
void RenderTransparentDepthPostpass ( CullResults cullResults , HDCamera hdCamera , ScriptableRenderContext renderContext , CommandBuffer cmd , ForwardPass pass )
void RenderTransparentDepthPrepass ( CullResults cull , HDCamera hdCamera , ScriptableRenderContext renderContext , CommandBuffer cmd )
{
if ( hdCamera . frameSettings . enableTransparentPrepass )
{
// Render transparent depth prepass after opaque one
using ( new ProfilingSample ( cmd , "Transparent Depth Prepass" , CustomSamplerId . TransparentDepthPrepass . GetSampler ( ) ) )
{
RenderTransparentRenderList ( cull , hdCamera , renderContext , cmd , m_TransparentDepthPrepassNames ) ;
}
}
}
void RenderTransparentDepthPostpass ( CullResults cullResults , HDCamera hdCamera , ScriptableRenderContext renderContext , CommandBuffer cmd )
{
if ( ! hdCamera . frameSettings . enableTransparentPostpass )
return ;