Skip to content

Commit ff5519d

Browse files
committed
make deferred rendering work
1 parent 2074003 commit ff5519d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_pbr/src/render/utils.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn coords_to_viewport_uv(position: vec2<f32>, viewport: vec4<f32>) -> vec2<f32>
3434
// For encoding normals or unit direction vectors as octahedral coordinates.
3535
fn octahedral_encode(v: vec3<f32>) -> vec2<f32> {
3636
var n = v / (abs(v.x) + abs(v.y) + abs(v.z));
37-
let octahedral_wrap = (1.0 - abs(n.yx)) * select(vec2(-1.0), vec2(1.0), n.xy > 0.0);
37+
let octahedral_wrap = (1.0 - abs(n.yx)) * select(vec2(-1.0), vec2(1.0), n.xy > vec2f(0.0));
3838
let n_xy = select(octahedral_wrap, n.xy, n.z >= 0.0);
3939
return n_xy * 0.5 + 0.5;
4040
}

0 commit comments

Comments
 (0)