From 99e1ce0690b3281c5496fa0e5f4266a4d62c6824 Mon Sep 17 00:00:00 2001 From: jfons Date: Sat, 6 Feb 2021 21:39:08 +0100 Subject: Invert spotlight angle attenuation Inverted the spotlight angle attenuation so a higher value results in a dimmer light, this makes it more consistent with the distance attenuation. Also changed the way spotlighs are computed in SDFGI and GIPorbes and GPU lightmapper, now it matches the falloff used in the scene rendering code. --- modules/lightmapper_rd/lightmapper_rd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/lightmapper_rd/lightmapper_rd.h') diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h index bb735baf6c..1c360bd0ab 100644 --- a/modules/lightmapper_rd/lightmapper_rd.h +++ b/modules/lightmapper_rd/lightmapper_rd.h @@ -54,8 +54,8 @@ class LightmapperRD : public Lightmapper { float size; float range; float attenuation; - float spot_angle; - float spot_attenuation; + float cos_spot_angle; + float inv_spot_attenuation; uint32_t static_bake; uint32_t pad[3]; -- cgit v1.2.3