mirror of
https://github.com/godotengine/godot
synced 2024-09-05 05:58:29 +00:00
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
This commit is contained in:
parent
fd4a06c515
commit
14494e08d1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue