context . ExecuteCommandBuffer ( cmd ) ;
cmd . Dispose ( ) ;
if ( lightData . isSingleDirectionalLight )
FillLightIndices ( ref cullResults , visibleLights . Length ) ;
// Setup light and shadow shader constants
SetupLightShaderVariables ( visibleLights , ref cullResults , ref context , ref lightData ) ;
if ( shadowsRendered )
private void FillLightIndices ( ref CullResults cullResults , int visibleLightsCount )
{
int visibleRenderersCount = cullResults . GetVisibleRenderersCount ( ) ;
//int visibleRenderersCount = cullResults.GetVisibleRenderersCount();
// TODO: commenting cullResults.GetVisislbeRenderersCount() to avoid compiler errors as it is not in main SRP trunk yet
// For now setting a small amount enough for the test scenes.
int visibleRenderersCount = 1 0 2 4 ;
if ( visibleRenderersCount > m_LightIndicesCount )
{
m_LightIndicesCount = visibleRenderersCount * visibleLightsCount ;
if ( ! lightData . isSingleDirectionalLight )
{
FillLightIndices ( ref cullResults , lights . Length ) ;
Math . Min ( kMaxVisibleLights , lights . Length ) ;
maxLights = Math . Min ( kMaxVisibleLights , lights . Length ) ;
}
for ( int i = 0 ; i < maxLights ; + + i )