// Setup shadow data arrays
// In case lightData.shadowDimmer == 0.0 we need to avoid rendering the shadow map... see how it can be done with the culling (and more specifically, how can we do that BEFORE sending for shadows)
bool hasShadows = lightData . shadowDimmer > 0.0f & & light . light . shadows ! = LightShadows . None & & shadowOutput . GetShadowSliceCountLightIndex ( lightIndex ) ! = 0 ;
bool hasShadows = lightData . shadowDimmer > 0.0f & & distanceToCamera < shadowSettings . maxShadowDistance & & light . light . shadows ! = LightShadows . None & & shadowOutput . GetShadowSliceCountLightIndex ( lightIndex ) ! = 0 ;
bool hasNotReachMaxLimit = shadowCount + ( lightData . lightType = = GPULightType . Point ? 6 : 1 ) < = k_MaxShadowOnScreen ;
// TODO: Read the comment about shadow limit/management at the beginning of this loop