Skip to content

Commit 08394b2

Browse files
vrethinachalamEvergreen
authored andcommitted
6000.1: Fix IndexOutOfRangeException Exception by allocating size with respect to visible lights length
1 parent 5617081 commit 08394b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ bool SetupForEmptyRendering(bool stripShadowsOffVariants, bool shadowsEnabled, U
686686
s_EmptyAdditionalShadowFadeParams = new Vector4(shadowFadeScale, shadowFadeBias, 0, 0);
687687

688688
var visibleLights = lightData.visibleLights;
689-
if (m_VisibleLightIndexToAdditionalLightIndex.Length < visibleLights.Length)
689+
if (s_EmptyAdditionalLightIndexToShadowParams.Length < visibleLights.Length)
690690
{
691691
m_VisibleLightIndexToAdditionalLightIndex = new short[visibleLights.Length];
692692
m_VisibleLightIndexToIsCastingShadows = new bool[visibleLights.Length];

0 commit comments

Comments
 (0)