From 6fe127dd0bfc65b2778ec34d82e5abec61c62125 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Aug 2023 22:12:33 +0900 Subject: [PATCH] [vulkan] Render all the requested lights Starting at start and ending at count doesn't end as well as one might like. --- libs/video/renderer/vulkan/shader/lighting_main.finc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/video/renderer/vulkan/shader/lighting_main.finc b/libs/video/renderer/vulkan/shader/lighting_main.finc index 075efc199..57cc56e3a 100644 --- a/libs/video/renderer/vulkan/shader/lighting_main.finc +++ b/libs/video/renderer/vulkan/shader/lighting_main.finc @@ -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;