From e45389c1a1ef3b5e742bcc592d7f36560752d6ad Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 12 Apr 2021 16:34:50 +0200 Subject: Fix T87324: incorrect parametric coordinates with light spread --- intern/cycles/kernel/kernel_light.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index f288ca3051a..42a834d2ce3 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -135,6 +135,8 @@ ccl_device_inline bool lamp_light_sample( ls->pdf = invarea; } else { + inplane = ls->P; + float3 sample_axisu = axisu; float3 sample_axisv = axisv; @@ -145,7 +147,6 @@ ccl_device_inline bool lamp_light_sample( } } - inplane = ls->P; ls->pdf = rect_light_sample(P, &ls->P, sample_axisu, sample_axisv, randu, randv, true); inplane = ls->P - inplane; } -- cgit v1.2.3