Skip to main content

compute_self_shadow

Function compute_self_shadow 

Source
pub fn compute_self_shadow(normal: Vec3, light_dir: Vec3, bias: f32) -> f32
Expand description

Self-shadow factor: front faces facing away from the light are shadowed. Returns 0.0 (fully shadowed) to 1.0 (fully lit).