pub fn reflectance(cosine: f32, refraction_index: f32) -> f32 {
    let mut r0 = (1.0 - refraction_index) / (1.0 + refraction_index);
    r0 = r0.powi(2);
    r0 + (1.0 - r0) * (1.0 - cosine).powi(5)
}
// Uses Schlick's approximation for reflectance
Uses Schlick's approximation for reflectance
Uses Schlick ' s approximation for reflectance
pub fn reflectance(cosine: f32, refraction_index: f32) -> f32 {
    let mut r0 = (1.0 - refraction_index) / (1.0 + refraction_index);
    r0 = r0.powi(2);
    r0 + (1.0 - r0) * (1.0 - cosine).powi(5)
}
pub fn reflectance ( cosine : f32 , refraction_index : f32 ) -> f32 { let mut r0 = ( 1.0 - refraction_index ) / ( 1.0 + refraction_index ) ; r0 = r0 . powi ( 2 ) ; r0 + ( 1.0 - r0 ) * ( 1.0 - cosine ) . powi ( 5 ) }
Uses Schlick's approximation for reflectance
Uses Schlick ' s approximation for reflectance
cosine
f32
refraction_index
f32
cosine
f32
refraction_index
f32