We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73de386 commit 6e1ff05Copy full SHA for 6e1ff05
src/Renderer/Shaders/cs_clustered_lightculling.sc
@@ -65,13 +65,12 @@ void main()
65
barrier();
66
67
// each thread is one cluster and checks against all lights in the cache
68
- for(uint j = 0; j < batchSize; j++)
+ for(uint i = 0; i < batchSize; i++)
69
{
70
- uint lightIndex = lightOffset + j;
71
Cluster cluster = getCluster(clusterIndex);
72
- if(visibleCount < MAX_LIGHTS_PER_CLUSTER && pointLightAffectsCluster(lights[lightIndex], cluster))
+ if(visibleCount < MAX_LIGHTS_PER_CLUSTER && pointLightIntersectsCluster(lights[i], cluster))
73
74
- visibleLights[visibleCount] = lightIndex;
+ visibleLights[visibleCount] = lightOffset + i;
75
visibleCount++;
76
}
77
0 commit comments