Browse Source

TSL: Fix `.negate()` (#26804)

* Fix dFdy().negate()

* Fix .negate()
sunag 1 year ago
parent
commit
cf340b9936
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/jsm/nodes/math/MathNode.js

+ 1 - 1
examples/jsm/nodes/math/MathNode.js

@@ -102,7 +102,7 @@ class MathNode extends TempNode {
 
 		} else if ( method === MathNode.NEGATE ) {
 
-			return builder.format( '-' + a.build( builder, inputType ), type, output );
+			return builder.format( '( - ' + a.build( builder, inputType ) + ' )', type, output );
 
 		} else if ( method === MathNode.ONE_MINUS ) {