mirror of
https://github.com/godotengine/godot
synced 2024-10-07 10:24:48 +00:00
Fix #14429 GIProbe does not work with SpotLights
This commit is contained in:
parent
75d0aeb0e9
commit
c3c1d119ec
|
@ -2283,7 +2283,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||||
if (angle > light_cache.spot_angle)
|
if (angle > light_cache.spot_angle)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float d = CLAMP(angle / light_cache.spot_angle, 1, 0);
|
float d = CLAMP(angle / light_cache.spot_angle, 0, 1);
|
||||||
att *= powf(1.0 - d, light_cache.spot_attenuation);
|
att *= powf(1.0 - d, light_cache.spot_attenuation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue