Skip to content

Explicitly pass F90 into schlick formula earlier #37

@trevordblack

Description

@trevordblack

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions