"Having removed the implicit cancelations, we can compute the specular attenuation by incorporating the material color into the Fresnel factor. schlick_fresnel is defined in terms of a scalar, so let's add a vectorized version in order to pass in the material color as F0:
...
fn schlick_fresnel_vec3(f0: vec3f, cos_theta: f32) -> vec3f {
let u = 1 - cos_theta;
return mix(f0, vec3(1.), u * u * u * u * u);
}
"
It's mentioned later, but it's worth passing F90 in as a parameter now, and briefly remind the reader what F90 is. Pass Vec3(1.) in from the caller.