Skip to content

Commit

Permalink
Merge pull request #1366 from hannobraun/shading
Browse files Browse the repository at this point in the history
Soften shading
  • Loading branch information
hannobraun authored Nov 17, 2022
2 parents 94d4c0c + c0da551 commit 6b839a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/fj-viewer/src/graphics/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn frag_model(in: VertexOutput) -> FragmentOutput {
let light = vec3<f32>(0.0, 0.0, -1.0);

let angle = acos(dot(light, -in.normal));
let f_angle = angle / (pi / 2.0);
let f_angle = angle / (pi * 0.75);

let f_normal = max(1.0 - f_angle, 0.0);

Expand Down

0 comments on commit 6b839a7

Please sign in to comment.