fn reflectance(cosine: f64, ref_idx: f64) -> f64 {
        let r0 = (1.0 - ref_idx) / (1.0 + ref_idx);
        let r0 = r0 * r0;
        r0 + (1.0 - r0) * f64::powi(1.0 - cosine, 5)
    }
/// Use Schlick's approximation for reflectance
Use Schlick's approximation for reflectance
Use Schlick ' s approximation for reflectance
fn reflectance(cosine: f64, ref_idx: f64) -> f64 {
        let r0 = (1.0 - ref_idx) / (1.0 + ref_idx);
        let r0 = r0 * r0;
        r0 + (1.0 - r0) * f64::powi(1.0 - cosine, 5)
    }
fn reflectance ( cosine : f64 , ref_idx : f64 ) -> f64 { let r0 = ( 1.0 - ref_idx ) / ( 1.0 + ref_idx ) ; let r0 = r0 * r0 ; r0 + ( 1.0 - r0 ) * f64 :: powi ( 1.0 - cosine , 5 ) }
Use Schlick's approximation for reflectance
Use Schlick ' s approximation for reflectance
cosine
f64
ref_idx
f64