Skip to content

Commit

Permalink
bevy_pbr2: pbr.wgsl: Fix the orthographic projection check (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump authored and cart committed Jul 24, 2021
1 parent e1e4055 commit a993719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipelined/bevy_pbr2/src/render/pbr.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ fn fragment(in: FragmentInput) -> [[location(0)]] vec4<f32> {
// # endif

var V: vec3<f32>;
if (view.view_proj.z.z != 1.0) { // If the projection is not orthographic
if (view.view_proj.w.w != 1.0) { // If the projection is not orthographic
// Only valid for a perpective projection
V = normalize(view.world_position.xyz - in.world_position.xyz);
} else {
Expand Down

0 comments on commit a993719

Please sign in to comment.