From c5fc34bb0bfaf9c76db4676f7d708b3d798fbe3a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 26 Jan 2024 00:02:57 +0900 Subject: [PATCH] [vulkan] Correct dynamic light distance for lightmaps I had gotten confused about how dynamic lights were calculated and thus used the wrong radius in the final intensity calculation. Takes care of the scruffy corners often visible on the dynamic lights. --- libs/video/renderer/vulkan/vulkan_lightmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/video/renderer/vulkan/vulkan_lightmap.c b/libs/video/renderer/vulkan/vulkan_lightmap.c index 097989770..d3eae2b8d 100644 --- a/libs/video/renderer/vulkan/vulkan_lightmap.c +++ b/libs/video/renderer/vulkan/vulkan_lightmap.c @@ -121,7 +121,7 @@ add_dynamic_lights (const vec4f_t *transform, msurface_t *surf, vec4f_t *block) } else { d = td + (sd >> 1); } - float l = dlight->radius - d; + float l = rad - d; if (l > minlight) { block[t * smax + s] += l * color; }