Skip to content

Instantly share code, notes, and snippets.

@pixnblox
pixnblox / README.md
Last active December 4, 2025 02:10
Address the shadow terminator problem by computing a new shading position

Original Tweet - June 6, 2020

I really should have known this "shadow terminator" ray tracing issue was going to happen, but I stumbled into it anyway. It is a surprisingly tricky / annoying / common problem, but I got it fixed with some help from @pointinpolygon and others.

image

This arises from a difference between shading normals and geometric normals, particularly with low-poly geometry. This POV-Ray page has a nice diagram that explains it: http://wiki.povray.org/content/Knowledgebase:The_Shadow_Line_Artifact. This is not a floating-point precision issue.

This is also different from the "bump" terminator problem, which is about normal maps and not low-poly self-shadowing. See "Ray Tracing Gems" chapter 12 for details on that. The solution there is to modify the BSDF to add shadowin