[Bf-blender-cvs] [d717a50d5bd] cycles-x: Fix error in last random walk bugfix

Brecht Van Lommel noreply at git.blender.org
Fri Sep 10 18:19:30 CEST 2021


Commit: d717a50d5bd6861c78a37dc9983e2e1aa039fedd
Author: Brecht Van Lommel
Date:   Fri Sep 10 16:18:47 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBd717a50d5bd6861c78a37dc9983e2e1aa039fedd

Fix error in last random walk bugfix

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

M	intern/cycles/kernel/integrator/integrator_subsurface.h

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

diff --git a/intern/cycles/kernel/integrator/integrator_subsurface.h b/intern/cycles/kernel/integrator/integrator_subsurface.h
index 1629677e0f8..0f2b9225ce2 100644
--- a/intern/cycles/kernel/integrator/integrator_subsurface.h
+++ b/intern/cycles/kernel/integrator/integrator_subsurface.h
@@ -192,9 +192,6 @@ ccl_device void subsurface_random_walk_coefficients(const float3 albedo,
   subsurface_random_walk_remap(albedo.y, radius.y, anisotropy, &sigma_t_y, &alpha_y);
   subsurface_random_walk_remap(albedo.z, radius.z, anisotropy, &sigma_t_z, &alpha_z);
 
-  *sigma_t = make_float3(sigma_t_x, sigma_t_y, sigma_t_z);
-  *alpha = make_float3(alpha_x, alpha_y, alpha_z);
-
   /* Throughput already contains closure weight at this point, which includes the
    * albedo, as well as closure mixing and Fresnel weights. Divide out the albedo
    * which will be added through scattering. */
@@ -216,6 +213,9 @@ ccl_device void subsurface_random_walk_coefficients(const float3 albedo,
     (*throughput).z *= alpha_z / min_alpha;
     alpha_z = min_alpha;
   }
+
+  *sigma_t = make_float3(sigma_t_x, sigma_t_y, sigma_t_z);
+  *alpha = make_float3(alpha_x, alpha_y, alpha_z);
 }
 
 /* References for Dwivedi sampling:



More information about the Bf-blender-cvs mailing list