Browse Source

TSL: Fix float over float conversion (#28562)

* TSL: Fix float over float conversion

* fix webgpu_lights_custom
sunag 1 year ago
parent
commit
6ee4d11668
2 changed files with 1 additions and 2 deletions
  1. 1 1
      examples/jsm/nodes/core/NodeBuilder.js
  2. 0 1
      examples/webgpu_lights_custom.html

+ 1 - 1
examples/jsm/nodes/core/NodeBuilder.js

@@ -1246,7 +1246,7 @@ class NodeBuilder {
 
 		}
 
-		if ( fromTypeLength === 1 && toTypeLength > 1 && fromType[ 0 ] !== toType[ 0 ] ) { // fromType is float-like
+		if ( fromTypeLength === 1 && toTypeLength > 1 && fromType !== this.getComponentType( toType ) ) { // fromType is float-like
 
 			// convert a number value to vector type, e.g:
 			// vec3( 1u ) -> vec3( float( 1u ) )

+ 0 - 1
examples/webgpu_lights_custom.html

@@ -126,7 +126,6 @@
 				renderer.setPixelRatio( window.devicePixelRatio );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setAnimationLoop( animate );
-				renderer.toneMappingNode = toneMapping( THREE.NeutralToneMapping, 1 );
 				document.body.appendChild( renderer.domElement );
 
 				// controls