Merge pull request #14468 from vitrig/fix-gi-doesnt-work-for-spotlights

Fix #14429 GIProbe does not work with SpotLights
This commit is contained in:
Rémi Verschelde 2017-12-09 21:03:59 +01:00 committed by GitHub
commit 33a5999394
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}