diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-09 21:03:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 21:03:59 +0100 |
commit | 33a59993945fb313309c8a68fe5d6e48b2bd1874 (patch) | |
tree | 56f1d49647c10c09c42575828f23d4a662431d97 /servers | |
parent | 75d0aeb0e9250db729ddba56570386f7c10084af (diff) | |
parent | c3c1d119ec871d78621f48bdf8c1911f5618f5ba (diff) |
Merge pull request #14468 from vitrig/fix-gi-doesnt-work-for-spotlights
Fix #14429 GIProbe does not work with SpotLights
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index eef4720d22..dde69eedd3 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -2283,7 +2283,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co if (angle > light_cache.spot_angle) 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); } |