浏览代码

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

* Fix dFdy().negate()

* Fix .negate()
sunag 1 年之前
父节点
当前提交
cf340b9936
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 ) {