[vulkan] Render all the requested lights

Starting at start and ending at count doesn't end as well as one might
like.
This commit is contained in:
Bill Currie 2023-08-03 22:12:33 +09:00
parent e4ed868023
commit 6fe127dd0b

View file

@ -33,9 +33,9 @@ main (void)
vec3 light = vec3 (0);
uint start = bitfieldExtract (queue, 0, 16);
uint count = bitfieldExtract (queue, 16, 16);
uint end = start + bitfieldExtract (queue, 16, 16);
for (uint i = start; i < count; i++) {
for (uint i = start; i < end; i++) {
uint id = lightIds[i];
LightData l = lights[id];
vec3 dir = l.position.xyz - l.position.w * p;