Merge branch 'blender-v2.93-release'

This commit is contained in:
Brecht Van Lommel 2021-04-21 18:00:26 +02:00
commit ef9551afd1
1 changed files with 7 additions and 0 deletions

View File

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