[Bf-blender-cvs] [aed9b6faee3] blender-v2.93-release: Fix some Cycles random walk SSS precision issues with small radius
Brecht Van Lommel
noreply at git.blender.org
Wed Apr 21 18:00:05 CEST 2021
Commit: aed9b6faee39f8049ca9a072f37d2c0c2ea3a760
Author: Brecht Van Lommel
Date: Wed Apr 21 17:32:32 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBaed9b6faee39f8049ca9a072f37d2c0c2ea3a760
Fix some Cycles random walk SSS precision issues with small radius
===================================================================
M intern/cycles/kernel/kernel_subsurface.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h
index c75958e79c5..0a56f867158 100644
--- a/intern/cycles/kernel/kernel_subsurface.h
+++ b/intern/cycles/kernel/kernel_subsurface.h
@@ -605,6 +605,13 @@ ccl_device_noinline
if (hit) {
t = ray->t;
}
+ else if (bounce == 0) {
+ /* Restore original position if nothing was hit after the first bounce.
+ * Otherwise if the ray_offset() to avoid self-intersection is relatively
+ * large compared to the scattering radius, we go never backup high enough
+ * to exit the surface. */
+ ray->P = sd->P;
+ }
/* Advance to new scatter location. */
ray->P += t * ray->D;
More information about the Bf-blender-cvs
mailing list