Skip to content

Commit 1ec136c

Browse files
Fix
1 parent 6327069 commit 1ec136c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ void DeferredContactShadow(uint2 groupThreadId : SV_GroupThreadID, uint2 groupId
200200
// Do the contact shadow for the directional light
201201
if (featureFlags & LIGHTFEATUREFLAGS_DIRECTIONAL)
202202
{
203-
if (_DirectionalShadowIndex >= 0)
203+
for (int i = 0; i < _DirectionalLightCount; ++i)
204204
{
205-
DirectionalLightData light = _DirectionalLightDatas[_DirectionalShadowIndex];
205+
DirectionalLightData light = _DirectionalLightDatas[i];
206206

207207
if (light.contactShadowMask != 0 && light.isRayTracedContactShadow == 0.0)
208208
{
@@ -214,6 +214,7 @@ void DeferredContactShadow(uint2 groupThreadId : SV_GroupThreadID, uint2 groupId
214214
// we take full bits at one multiplied by contact shadow and filter the bit at the contact shadow index.
215215
contactShadowMask |= light.contactShadowMask * occluded;
216216
}
217+
217218
}
218219
}
219220

0 commit comments

Comments
 (0)