diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute index c67a59f4c8d..a8925945841 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute @@ -469,15 +469,15 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL float2 V = abs( float2( dot(fromLight, lightData.lightAxisX.xyz), dot(fromLight, lightData.lightAxisY.xyz) ) ); float fDist2D = bIsSpotDisc ? length(V) : max(V.x,V.y); - bool isValid = all( float2(lightData.radiusSq, fSclProj) > float2(distSq, fDist2D*lightData.cotan) ); + bool validInPixel = all( float2(lightData.radiusSq, fSclProj) > float2(distSq, fDist2D*lightData.cotan) ); #ifdef PLATFORM_SUPPORTS_WAVE_INTRINSICS //a wave is on the same tile, and the loop is uniform for the wave. // thus we early out if at least 1 thread in the wave passed this light, saving some ALU. - lightValid = WaveActiveAnyTrue(isValid); + lightValid = WaveActiveAnyTrue(validInPixel); #else - lightValid = isValid; + lightValid = validInPixel; #endif - if (isValid) + if (lightValid) break; } } @@ -496,13 +496,13 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL float3 toLight = vLp - vVPos; float distSq = dot(toLight,toLight); - bool isValid = lightData.radiusSq>distSq; + bool validInPixel = lightData.radiusSq>distSq; #ifdef PLATFORM_SUPPORTS_WAVE_INTRINSICS - lightValid = WaveActiveAnyTrue(isValid); + lightValid = WaveActiveAnyTrue(validInPixel); #else - lightValid = isValid; + lightValid = validInPixel; #endif - if (isValid) + if (lightValid) break; } } @@ -521,13 +521,13 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL float3 dist = float3( dot(toLight, lightData.lightAxisX), dot(toLight, lightData.lightAxisY), dot(toLight, lightData.lightAxisZ) ); dist = (abs(dist) - lightData.boxInnerDist) * lightData.boxInvRange; // not as efficient as it could be - bool isValid = max(max(dist.x, dist.y), dist.z)<1; // but allows us to not write out OuterDists + bool validInPixel = max(max(dist.x, dist.y), dist.z)<1; // but allows us to not write out OuterDists #ifdef PLATFORM_SUPPORTS_WAVE_INTRINSICS - lightValid = WaveActiveAnyTrue(isValid); + lightValid = WaveActiveAnyTrue(validInPixel); #else - lightValid = isValid; + lightValid = validInPixel; #endif - if (isValid) + if (lightValid) break; } }