diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-01-15 16:45:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-01-15 16:45:42 +0300 |
commit | 3fa548f986271321663c1877ee499e9724a41324 (patch) | |
tree | b0d8ded4a078704b6369b73c17a6964dc5b3d786 /source | |
parent | aa3720ed82fe46a31894437519478b79dd2939f8 (diff) |
Fix T72871 Overlay: Spotlights cone is much smaller than before
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |