Fix #107004: Cycles shadow caustics not working with area lights

Tested the wrong variable after a refactor for light spread.
This commit is contained in:
Brecht Van Lommel 2023-04-17 20:45:50 +02:00 committed by Thomas Dinges
parent 91b1f5f078
commit 68537a31a6

View file

@ -342,7 +342,7 @@ ccl_device_forceinline void area_light_update_position(const ccl_global KernelLi
ls->D = normalize_len(ls->P - P, &ls->t);
ls->pdf = invarea;
if (klight->area.tan_half_spread > 0) {
if (klight->area.normalize_spread > 0) {
ls->eval_fac = 0.25f * invarea;
ls->eval_fac *= area_light_spread_attenuation(
ls->D, ls->Ng, klight->area.tan_half_spread, klight->area.normalize_spread);