Skip to content

Commit

Permalink
Increase epsilon for bilinear patch self-intersection test.
Browse files Browse the repository at this point in the history
Work-around for infinite loop in subsurface scattering in #416.
  • Loading branch information
mmp committed Jan 30, 2025
1 parent dfad74c commit 779d1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pbrt/shapes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ PBRT_CPU_GPU inline pstd::optional<BilinearIntersection> IntersectBilinearPatch(

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

Expand Down

0 comments on commit 779d1a7

Please sign in to comment.