Skip to content

Commit d0ca148

Browse files
authored
Fixing ps4 light list build (#6258)
1 parent eadd819 commit d0ca148

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,14 @@ void StoreLightVolumeCache(int lightIndex, int coarseIndex, uint volumeType)
404404
{
405405
// 3 bits for the volume type, in case we have a corrupted one we can early out of the switch statement.
406406
// 29 bits for a coarse light index.
407-
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (coarseIndex << 3);
407+
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (uint)(coarseIndex << 3);
408408
}
409409

410-
void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out int volumeType)
410+
void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out uint volumeType)
411411
{
412412
int data = s_lightVolumesCache[lightIndex];
413413
coarseIndex = data >> 3;
414-
volumeType = data & 0x7;
414+
volumeType = (uint)(data & 0x7);
415415
}
416416

417417
// initializes ldsNrLightsFinal with the number of accepted lights.
@@ -433,7 +433,7 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL
433433

434434
if (threadID < (uint)iNrCoarseLights)
435435
{
436-
int idxCoarse = GetCoarseLightIndex(threadID, iNrCoarseLights);
436+
int idxCoarse = GetCoarseLightIndex((int)threadID, iNrCoarseLights);
437437
uint uLightVolume = _LightVolumeData[idxCoarse].lightVolume;
438438
StoreLightVolumeCache(threadID, idxCoarse, uLightVolume);
439439
}

0 commit comments

Comments
 (0)