From 3fa548f986271321663c1877ee499e9724a41324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 15 Jan 2020 14:45:31 +0100 Subject: [PATCH] Fix T72871 Overlay: Spotlights cone is much smaller than before --- source/blender/draw/engines/overlay/overlay_extra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index fbba7ce39ea..6f4fe5573ec 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -637,6 +637,9 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob) DRW_buffer_add_entry(cb->light_sun, color, &instdata); } else if (la->type == LA_SPOT) { + /* Previous implementation was using the clipend distance as cone size. + * We cannot do this anymore so we use a fixed size of 10. (see T72871) */ + rescale_m4(instdata.mat, (float[3]){10.0f, 10.0f, 10.0f}); /* For cycles and eevee the spot attenuation is * y = (1/(1 + x^2) - a)/((1 - a) b) * We solve the case where spot attenuation y = 1 and y = 0