Skip to content

Commit 9173dfa

Browse files
committed
wip: maybe make u_numLight uint instead?
1 parent 70f9345 commit 9173dfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/renderer/glsl_source/lighttile_fp.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void main() {
120120
only process 1 / 4 of different lights for each layer, extra lights going into the last layer. This can fail to add some lights
121121
if 1 / 4 of all lights is more than the amount of lights that each layer can hold (16). To fix this, we'd need to either do this on CPU
122122
or use compute shaders with atomics so we can have a variable amount of lights for each tile. */
123-
for( uint i = u_lightLayer; i < u_numLights; i += uint( NUM_LIGHT_LAYERS ) ) {
123+
for( uint i = u_lightLayer; i < uint( u_numLights ); i += uint( NUM_LIGHT_LAYERS ) ) {
124124
Light l = GetLight( i );
125125
vec3 center = ( u_ModelMatrix * vec4( l.center, 1.0 ) ).xyz;
126126
float radius = max( 2.0 * l.radius, 2.0 * 32.0 ); // Avoid artifacts with weak light sources

0 commit comments

Comments
 (0)