File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,13 @@ export const transformedNormalView = /*@__PURE__*/ ( Fn( ( builder ) => {
8383
8484 // Use getUV context to avoid side effects from nodes overwriting getUV in the context (e.g. EnvironmentNode)
8585
86- return builder . context . setupNormal ( ) . context ( { getUV : null } ) ;
86+ let node = builder . context . setupNormal ( ) . context ( { getUV : null } ) ;
8787
88- } , 'vec3' ) . once ( ) ) ( ) . mul ( faceDirection ) . toVar ( 'transformedNormalView' ) ;
88+ if ( builder . material . flatShading === false ) node = node . mul ( faceDirection ) ;
89+
90+ return node ;
91+
92+ } , 'vec3' ) . once ( ) ) ( ) . toVar ( 'transformedNormalView' ) ;
8993
9094/**
9195 * TSL object that represents the transformed vertex normal in world space of the current rendered object.
You can’t perform that action at this time.
0 commit comments