Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/bevy_pbr/src/render/pbr_lighting.wesl
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ fn G_Smith(NdotV: f32, NdotL: f32, roughness: f32) -> f32 {
//
// https://google.github.io/filament/Filament.md.html#materialsystem/clearcoatmodel
fn V_Kelemen(LdotH: f32) -> f32 {
return 0.25 / (LdotH * LdotH);
let l_dot_h = max(LdotH, 0.0001);
return 0.25 / (l_dot_h * l_dot_h);
}

// Fresnel function
Expand Down