-
Notifications
You must be signed in to change notification settings - Fork 980
Open
Milestone
Description
In Listing 18: Remembering the side of the surface
bool front_face;
if (dot(ray_direction, outward_normal) > 0.0) {
// ray is inside the sphere
normal = -outward_normal;
front_face = false;
} else {
// ray is outside the sphere
normal = outward_normal;
front_face = true;
}
The dot product between the outward_normal and the ray_direction being positive implies the point in in the backside of the sphere and negative implies the point in in the frontside of the sphere. But the comment says the ray is inside/outside. This is ambiguous.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels