From b6a98a7dda91bf169e3ef1b164bd3447a89bc64f Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 18 Jul 2025 12:28:57 -0400 Subject: [PATCH] dont normalize twice for no reason --- crates/bevy_pbr/src/render/utils.wgsl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/bevy_pbr/src/render/utils.wgsl b/crates/bevy_pbr/src/render/utils.wgsl index c887e3005e..b474b1a50e 100644 --- a/crates/bevy_pbr/src/render/utils.wgsl +++ b/crates/bevy_pbr/src/render/utils.wgsl @@ -55,8 +55,7 @@ fn octahedral_encode(v: vec3) -> vec2 { // For decoding normals or unit direction vectors from octahedral coordinates. fn octahedral_decode(v: vec2) -> vec3 { let f = v * 2.0 - 1.0; - var n = octahedral_decode_signed(f); - return normalize(n); + return octahedral_decode_signed(f); } // Like octahedral_decode, but for input in [-1, 1] instead of [0, 1].