Skip to content

Fixing ps4 light list build #6258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,14 @@ void StoreLightVolumeCache(int lightIndex, int coarseIndex, uint volumeType)
{
// 3 bits for the volume type, in case we have a corrupted one we can early out of the switch statement.
// 29 bits for a coarse light index.
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (coarseIndex << 3);
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (uint)(coarseIndex << 3);
}

void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out int volumeType)
void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out uint volumeType)
{
int data = s_lightVolumesCache[lightIndex];
coarseIndex = data >> 3;
volumeType = data & 0x7;
volumeType = (uint)(data & 0x7);
}

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

if (threadID < (uint)iNrCoarseLights)
{
int idxCoarse = GetCoarseLightIndex(threadID, iNrCoarseLights);
int idxCoarse = GetCoarseLightIndex((int)threadID, iNrCoarseLights);
uint uLightVolume = _LightVolumeData[idxCoarse].lightVolume;
StoreLightVolumeCache(threadID, idxCoarse, uLightVolume);
}
Expand Down