Burley (Disney) diffuse term. Tracks the view-dependent darkening near grazing angles for rough dielectrics that Lambert gets wrong.
(n_dot_l: f32, n_dot_v: f32, l_dot_h: f32, roughness: f32)
| 1094 | /// Burley (Disney) diffuse term. Tracks the view-dependent darkening |
| 1095 | /// near grazing angles for rough dielectrics that Lambert gets wrong. |
| 1096 | fn burley_diffuse(n_dot_l: f32, n_dot_v: f32, l_dot_h: f32, roughness: f32) -> f32 { |
| 1097 | let fd90 = 0.5 + 2.0 * l_dot_h * l_dot_h * roughness; |
| 1098 | let light = 1.0 + (fd90 - 1.0) * (1.0 - n_dot_l).powi(5); |
| 1099 | let view = 1.0 + (fd90 - 1.0) * (1.0 - n_dot_v).powi(5); |
| 1100 | light * view / std::f32::consts::PI |
| 1101 | } |
| 1102 | |
| 1103 | #[derive(Clone, Copy)] |
| 1104 | struct SurfaceSample { |
no outgoing calls
no test coverage detected