Function tinyraytracer::light_is_shadowed [−][src]
pub(crate) fn light_is_shadowed(
hit_point: Vec3,
hit_normal: Vec3,
light_position: Vec3,
scene: &[Box<dyn RayCollision>]
) -> bool
Shadow is like a negative light, we “cast a ray of shadow” for a certain hit point and light source. If the shadow ray hits the object, we know that the object is in shadow and we can’t see the light source. (Github Copilot wrote this line for me, how cool is that?)