"Forward Transparent"
} ;
static readonly RenderQueueRange k_RenderQueue_PreRefraction = new RenderQueueRange { min = ( int ) HDRenderQueue . PreRefractionMin , max = ( int ) HDRenderQueue . PreRefractionMax } ;
static readonly RenderQueueRange k_RenderQueue_Transparent = new RenderQueueRange { min = ( int ) HDRenderQueue . TransparentMin , max = ( int ) HDRenderQueue . TransparentMax } ;
static readonly RenderQueueRange k_RenderQueue_AllTransparent = new RenderQueueRange { min = ( int ) HDRenderQueue . PreRefractionMin , max = ( int ) HDRenderQueue . TransparentMax } ;
readonly HDRenderPipelineAsset m_Asset ;
DiffusionProfileSettings m_InternalSSSAsset ;
var filterSettings = new FilterRenderersSettings ( true )
{
renderQueueRange = inRenderQueueRange = = null ? RenderQueueRange . o paque : inRenderQueueRange . Value
renderQueueRange = inRenderQueueRange = = null ? HDRenderQueue . k_RenderQueue_AllO paque : inRenderQueueRange . Value
} ;
if ( stateBlock = = null )
var filterSettings = new FilterRenderersSettings ( true )
{
renderQueueRange = inRenderQueueRange = = null ? k_RenderQueue_AllTransparent : inRenderQueueRange . Value
renderQueueRange = inRenderQueueRange = = null ? HDRenderQueue . k_RenderQueue_AllTransparent : inRenderQueueRange . Value
} ;
if ( stateBlock = = null )
{
// We render first the opaque object as opaque alpha tested are more costly to render and could be reject by early-z (but not Hi-z as it is disable with clip instruction)
// This is handled automatically with the RenderQueue value (OpaqueAlphaTested have a different value and thus are sorted after Opaque)
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , m_DepthOnlyAndDepthForwardOnlyPassNames , 0 , RenderQueueRange . o paque, m_DepthStateOpaque ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , m_DepthOnlyAndDepthForwardOnlyPassNames , 0 , HDRenderQueue . k_RenderQueue_AllO paque, m_DepthStateOpaque ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , m_DepthForwardOnlyPassNames , 0 , RenderQueueRange . o paque, m_DepthStateOpaque ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , m_DepthForwardOnlyPassNames , 0 , HDRenderQueue . k_RenderQueue_AllO paque, m_DepthStateOpaque ) ;
// Render Alpha test only if requested
if ( addAlphaTestedOnly )
if ( m_CurrentDebugDisplaySettings . IsDebugDisplayEnabled ( ) )
{
// When doing debug display, the shader has the clip instruction regardless of the depth prepass so we can use regular depth test.
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferDebugDisplayName , m_currentRendererConfigurationBakedLighting , RenderQueueRange . opaque , m_DepthStateOpaque ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferDebugDisplayName , m_currentRendererConfigurationBakedLighting , HDRenderQueue . k_RenderQueue_AllOpaque , m_DepthStateOpaque ) ;
var rangeOpaqueNoAlphaTest = new RenderQueueRange { min = ( int ) RenderQueue . Geometry , max = ( int ) RenderQueue . AlphaTest - 1 } ;
var rangeOpaqueAlphaTest = new RenderQueueRange { min = ( int ) RenderQueue . AlphaTest , max = ( int ) RenderQueue . GeometryLast - 1 } ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferName , m_currentRendererConfigurationBakedLighting , rangeOpaqueNoAlphaTest , m_FrameSettings . enableAlphaTestOnlyInDeferredPrepass ? m_DepthStateOpaque : m_DepthStateOpaqueWithPrepass ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferName , m_currentRendererConfigurationBakedLighting , HDRenderQueue . k_RenderQueue_OpaqueNoAlphaTest , m_FrameSettings . enableAlphaTestOnlyInDeferredPrepass ? m_DepthStateOpaque : m_DepthStateOpaqueWithPrepass ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferWithPrepassName , m_currentRendererConfigurationBakedLighting , rangeOpaqueAlphaTest , m_DepthStateOpaqueWithPrepass ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferWithPrepassName , m_currentRendererConfigurationBakedLighting , HDRenderQueue . k_RenderQueue_OpaqueAlphaTest , m_DepthStateOpaqueWithPrepass ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferName , m_currentRendererConfigurationBakedLighting , RenderQueueRange . opaque , m_DepthStateOpaque ) ;
RenderOpaqueRenderList ( cull , camera , renderContext , cmd , HDShaderPassNames . s_GBufferName , m_currentRendererConfigurationBakedLighting , HDRenderQueue . k_RenderQueue_AllOpaque , m_DepthStateOpaque ) ;
}
}
}
CoreUtils . SetRenderTarget ( cmd , m_CameraColorBufferRT , m_CameraDepthStencilBufferRT ) ;
var passNames = m_CurrentDebugDisplaySettings . IsDebugDisplayEnabled ( ) ? m_AllTransparentDebugDisplayPassNames : m_AllTransparentPassNames ;
RenderTransparentRenderList ( cullResults , camera , renderContext , cmd , passNames , m_currentRendererConfigurationBakedLighting , pass = = ForwardPass . PreRefraction ? k_RenderQueue_PreRefraction : k_RenderQueue_Transparent ) ;
RenderTransparentRenderList ( cullResults , camera , renderContext , cmd , passNames , m_currentRendererConfigurationBakedLighting , pass = = ForwardPass . PreRefraction ? HDRenderQueue . k_RenderQueue_PreRefraction : HDRenderQueue . k_RenderQueue_Transparent ) ;
}
}
}
}
else
{
RenderTransparentRenderList ( cullResults , camera , renderContext , cmd , m_ForwardErrorPassNames , 0 , pass = = ForwardPass . PreRefraction ? k_RenderQueue_PreRefraction : k_RenderQueue_Transparent , null , m_ErrorMaterial ) ;
RenderTransparentRenderList ( cullResults , camera , renderContext , cmd , m_ForwardErrorPassNames , 0 , pass = = ForwardPass . PreRefraction ? HDRenderQueue . k_RenderQueue_PreRefraction : HDRenderQueue . k_RenderQueue_Transparent , null , m_ErrorMaterial ) ;
}
}
}