Fix T41709: Bump not rendered correctly behind transparency using Branched Path Tracing
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 6 Sep 2014 12:16:38 +0000 (18:16 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 6 Sep 2014 12:16:38 +0000 (18:16 +0600)
intern/cycles/kernel/kernel_path.h

index b74822bc0957faa41e9deb3b7361180ce149db7b..515854b6e9cdf1a72966db39e90ac2b5d73145d0 100644 (file)
@@ -1047,6 +1047,13 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
                ray.P = ray_offset(sd.P, -sd.Ng);
                ray.t -= sd.ray_length; /* clipping works through transparent */
 
+
+#ifdef __RAY_DIFFERENTIALS__
+               ray.dP = sd.dP;
+               ray.dD.dx = -sd.dI.dx;
+               ray.dD.dy = -sd.dI.dy;
+#endif
+
 #ifdef __VOLUME__
                /* enter/exit volume */
                kernel_volume_stack_enter_exit(kg, &sd, state.volume_stack);