summaryrefslogtreecommitdiffstats
path: root/modules/lightmapper_rd/lightmapper_rd.h
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2021-02-06 21:39:08 +0100
committerjfons <joan.fonssanchez@gmail.com>2021-02-07 20:10:33 +0100
commit99e1ce0690b3281c5496fa0e5f4266a4d62c6824 (patch)
treef0c7bece59ee144a79fad3fe4522bb1ea440e4de /modules/lightmapper_rd/lightmapper_rd.h
parent7bb7a3c4a7d2fc8f3f75176d89989253faf0e361 (diff)
downloadredot-engine-99e1ce0690b3281c5496fa0e5f4266a4d62c6824.tar.gz
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.
Diffstat (limited to 'modules/lightmapper_rd/lightmapper_rd.h')
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.h4
1 files changed, 2 insertions, 2 deletions
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];