mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
bevy_pbr2: pbr.wgsl: Fix the orthographic projection check (#17)
This commit is contained in:
parent
e1e4055a51
commit
a9937190cd
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue