diff options
author | Bram Stolk <b.stolk@gmail.com> | 2023-05-11 09:46:46 -0700 |
---|---|---|
committer | Bram Stolk <b.stolk@gmail.com> | 2023-05-11 09:46:46 -0700 |
commit | 14494e08d1a936bb73edf53e1f5fd49d73b8cb05 (patch) | |
tree | f5e8c77985582eaf4032d3b8a09a848a68351cd9 /drivers | |
parent | fd4a06c51555904104b18494d0224f450d74fe2a (diff) | |
download | redot-engine-14494e08d1a936bb73edf53e1f5fd49d73b8cb05.tar.gz |
Initialize light intensity parameter before use.
Unlike renderer_rd, the gles3 light storage fails to initialize
the intensity of the light.
To avoid using garbage memory, possibly NaN, we use the same
default value that renderer_rd uses.
Fixes #76956
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/storage/light_storage.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gles3/storage/light_storage.cpp b/drivers/gles3/storage/light_storage.cpp index 026f7467a8..8da5e657cd 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -76,6 +76,7 @@ void LightStorage::_light_initialize(RID p_light, RS::LightType p_type) { light.param[RS::LIGHT_PARAM_SHADOW_BLUR] = 0; light.param[RS::LIGHT_PARAM_SHADOW_PANCAKE_SIZE] = 20.0; light.param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS] = 0.05; + light.param[RS::LIGHT_PARAM_INTENSITY] = p_type == RS::LIGHT_DIRECTIONAL ? 100000.0 : 1000.0; light_owner.initialize_rid(p_light, light); } |