Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-04-21 19:00:26 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-04-21 19:00:26 +0300
commitef9551afd158c04437ec35a10b0aee107ae342aa (patch)
treed0797eb845e91b6e47406a45fe1607d72c30f32a
parent3da74c1c18dca19af9e2745ff9ea5ad587f3b47e (diff)
parentaed9b6faee39f8049ca9a072f37d2c0c2ea3a760 (diff)
Merge branch 'blender-v2.93-release'
-rw-r--r--intern/cycles/kernel/kernel_subsurface.h7
1 files changed, 7 insertions, 0 deletions
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;