From f4645891904504c0b4e85abaee2e06c8d7dedadd Mon Sep 17 00:00:00 2001 From: sunag Date: Mon, 2 Sep 2024 19:51:25 -0300 Subject: [PATCH] TSL - Normal: Remove redundancy (#29300) --- src/nodes/accessors/Normal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodes/accessors/Normal.js b/src/nodes/accessors/Normal.js index d7dbefb2e248dc..160cec6365f4a4 100644 --- a/src/nodes/accessors/Normal.js +++ b/src/nodes/accessors/Normal.js @@ -44,7 +44,7 @@ export const normalView = /*@__PURE__*/ ( Fn( ( builder ) => { }, 'vec3' ).once() )().toVar( 'normalView' ); -export const normalWorld = /*@__PURE__*/ varying( normalView.transformDirection( cameraViewMatrix ).normalize(), 'v_normalWorld' ).normalize().toVar( 'normalWorld' ); +export const normalWorld = /*@__PURE__*/ varying( normalView.transformDirection( cameraViewMatrix ), 'v_normalWorld' ).normalize().toVar( 'normalWorld' ); export const transformedNormalView = /*@__PURE__*/ ( Fn( ( builder ) => { @@ -53,7 +53,7 @@ export const transformedNormalView = /*@__PURE__*/ ( Fn( ( builder ) => { }, 'vec3' ).once() )().mul( faceDirection ).toVar( 'transformedNormalView' ); -export const transformedNormalWorld = /*@__PURE__*/ transformedNormalView.transformDirection( cameraViewMatrix ).normalize().toVar( 'transformedNormalWorld' ); +export const transformedNormalWorld = /*@__PURE__*/ transformedNormalView.transformDirection( cameraViewMatrix ).toVar( 'transformedNormalWorld' ); export const transformedClearcoatNormalView = /*@__PURE__*/ ( Fn( ( builder ) => {