Skip to content

Commit 779d1a7

Browse files
committed
Increase epsilon for bilinear patch self-intersection test.
Work-around for infinite loop in subsurface scattering in #416.
1 parent dfad74c commit 779d1a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pbrt/shapes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ PBRT_CPU_GPU inline pstd::optional<BilinearIntersection> IntersectBilinearPatch(
12901290

12911291
// Find epsilon _eps_ to ensure that candidate $t$ is greater than zero
12921292
Float eps =
1293-
gamma(10) * (MaxComponentValue(Abs(ray.o)) + MaxComponentValue(Abs(ray.d)) +
1293+
gamma(30) * (MaxComponentValue(Abs(ray.o)) + MaxComponentValue(Abs(ray.d)) +
12941294
MaxComponentValue(Abs(p00)) + MaxComponentValue(Abs(p10)) +
12951295
MaxComponentValue(Abs(p01)) + MaxComponentValue(Abs(p11)));
12961296

0 commit comments

Comments
 (0)