Function rustracer::shape::sphere_normal
source · fn sphere_normal(point: Point, ray_dir: Vector) -> NormalExpand description
Calculates normals to Sphere’s surface.
This Function is meant to be used inside Sphere’s
RayIntersection implementation.
ray_dir is the direction of an impacting Ray and
is used to determine on which side of the surface the normal is calculated.