Skip to content

Commit

Permalink
Fix sorting on Quest
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantin committed Nov 27, 2024
1 parent efedb56 commit d508f39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/Shaders/SortCommon.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,15 @@ inline uint2 CountBitsWGE16(uint waveSize, uint ltMask, uint4 waveFlags)

for(uint wavePart = 0; wavePart < waveSize; wavePart += 32)
{
uint t = countbits(waveFlags[wavePart >> 5]);
if (WaveGetLaneIndex() >= wavePart)
{
uint t = countbits(waveFlags[wavePart >> 5]);
if (WaveGetLaneIndex() >= wavePart + 32)
count.x += t;
else
count.x += countbits(waveFlags[wavePart >> 5] & ltMask);
count.y += t;
}
count.y += t;
}

return count;
Expand Down

0 comments on commit d508f39

Please sign in to comment.