What is the behavior for a ray hitting an object where the origin of the ray is within the object? Does the ray continue to the outside of the object or does it reflect back inside?
This situation can arise in two ways: the model placed the viewer inside an object, or rounding error caused a shadow or reflected ray’s origin to slip inside an object. In the former case, you can either cull the surface or flip the normal; we will not test for it. In the latter case, you need to make sure that the ray is not obstructed by its originating surface.