[Bf-blender-cvs] [e45389c1a1e] master: Fix T87324: incorrect parametric coordinates with light spread

Brecht Van Lommel noreply at git.blender.org
Mon Apr 12 20:13:11 CEST 2021


Commit: e45389c1a1ef3b5e742bcc592d7f36560752d6ad
Author: Brecht Van Lommel
Date:   Mon Apr 12 16:34:50 2021 +0200
Branches: master
https://developer.blender.org/rBe45389c1a1ef3b5e742bcc592d7f36560752d6ad

Fix T87324: incorrect parametric coordinates with light spread

===================================================================

M	intern/cycles/kernel/kernel_light.h

===================================================================

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



More information about the Bf-blender-cvs mailing list