diff --git a/crates/bevy_pbr/src/render/pbr_functions.wgsl b/crates/bevy_pbr/src/render/pbr_functions.wgsl index 58eb7023e7243..3e90463534163 100644 --- a/crates/bevy_pbr/src/render/pbr_functions.wgsl +++ b/crates/bevy_pbr/src/render/pbr_functions.wgsl @@ -91,12 +91,12 @@ fn apply_normal_mapping( // calculates the normal maps so there is no error introduced. Do not change this code // unless you really know what you are doing. // http://www.mikktspace.com/ - N = normalize(Nt.x * T + Nt.y * B + Nt.z * N); + N = Nt.x * T + Nt.y * B + Nt.z * N; #endif #endif #endif - return N; + return normalize(N); } // NOTE: Correctly calculates the view vector depending on whether diff --git a/crates/bevy_pbr/src/render/skinning.wgsl b/crates/bevy_pbr/src/render/skinning.wgsl index 9fe80c904163d..8332d0161347a 100644 --- a/crates/bevy_pbr/src/render/skinning.wgsl +++ b/crates/bevy_pbr/src/render/skinning.wgsl @@ -30,9 +30,13 @@ fn skin_normals( model: mat4x4, normal: vec3, ) -> vec3 { - return inverse_transpose_3x3(mat3x3( - model[0].xyz, - model[1].xyz, - model[2].xyz - )) * normal; + return normalize( + inverse_transpose_3x3( + mat3x3( + model[0].xyz, + model[1].xyz, + model[2].xyz + ) + ) * normal + ); }