m_ShadowMgr = new ShadowManager ( shadowSettings , ref scInit , m_Shadowmaps ) ;
// set global overrides - these need to match the override specified in LightLoop/Shadow.hlsl
bool useGlobalOverrides = true ;
m_ShadowMgr . SetGlobalShadowOverride ( GPUShadowType . Point , ShadowAlgorithm . PCF , ShadowVariant . V4 , ShadowPrecision . High , useGlobalOverrides ) ;
m_ShadowMgr . SetGlobalShadowOverride ( GPUShadowType . Spot , ShadowAlgorithm . PCF , ShadowVariant . V4 , ShadowPrecision . High , useGlobalOverrides ) ;
m_ShadowMgr . SetGlobalShadowOverride ( GPUShadowType . Point , ShadowAlgorithm . PCF , ShadowVariant . V1 , ShadowPrecision . High , useGlobalOverrides ) ;
m_ShadowMgr . SetGlobalShadowOverride ( GPUShadowType . Spot , ShadowAlgorithm . PCF , ShadowVariant . V1 , ShadowPrecision . High , useGlobalOverrides ) ;
m_ShadowMgr . SetGlobalShadowOverride ( GPUShadowType . Directional , ShadowAlgorithm . PCF , ShadowVariant . V3 , ShadowPrecision . High , useGlobalOverrides ) ;
m_ShadowMgr . SetShadowLightTypeDelegate ( HDShadowLightType ) ;
static int s_deferredDirectionalShadowKernel ;
static int s_deferredDirectionalShadow_Contact_Kernel ;
static int s_deferredDirectionalShadow_Normals_Kernel ;
static ComputeBuffer s_LightVolumeDataBuffer = null ;
static ComputeBuffer s_ConvexBoundsBuffer = null ;
s_deferredDirectionalShadowKernel = deferredDirectionalShadowComputeShader . FindKernel ( "DeferredDirectionalShadow" ) ;
s_deferredDirectionalShadow_Contact_Kernel = deferredDirectionalShadowComputeShader . FindKernel ( "DeferredDirectionalShadow_Contact" ) ;
s_deferredDirectionalShadow_Normals_Kernel = deferredDirectionalShadowComputeShader . FindKernel ( "DeferredDirectionalShadow_Normals" ) ;
for ( int variant = 0 ; variant < LightDefinitions . s_NumFeatureVariants ; variant + + )
{
AdditionalShadowData asd = m_CurrentSunLight . GetComponent < AdditionalShadowData > ( ) ;
bool enableContactShadows = m_FrameSettings . enableContactShadows & & asd . enableContactShadows & & asd . contactShadowLength > 0.0f ;
int kernel = enableContactShadows ? s_deferredDirectionalShadow_Contact_Kernel : s_deferredDirectionalShadowKernel ;
int kernel = enableContactShadows ? s_deferredDirectionalShadow_Contact_Kernel : ( m_FrameSettings . enableForwardRenderingOnly ? s_deferredDirectionalShadowKernel : s_deferredDirectionalShadow_Normals_Kernel ) ;
m_ShadowMgr . BindResources ( cmd , deferredDirectionalShadowComputeShader , kernel ) ;