diff --git a/pipelined/bevy_pbr2/src/render/pbr.wgsl b/pipelined/bevy_pbr2/src/render/pbr.wgsl index 5c5a34da085e4..0e5066b73ecd5 100644 --- a/pipelined/bevy_pbr2/src/render/pbr.wgsl +++ b/pipelined/bevy_pbr2/src/render/pbr.wgsl @@ -427,7 +427,7 @@ fn fragment(in: FragmentInput) -> [[location(0)]] vec4 { // # endif var V: vec3; - 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 {