Browse Source

TSL: `wgslFn` added alias and revision - 2 (#28687)

sunag 1 year ago
parent
commit
852b1f55ed

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

@@ -494,7 +494,7 @@ class NodeBuilder {
 
 
 	isReference( type ) {
 	isReference( type ) {
 
 
-		return type === 'void' || type === 'property' || type === 'sampler' || type === 'texture' || type === 'cubeTexture' || type === 'storageTexture' || type === 'texture3D';
+		return type === 'void' || type === 'property' || type === 'sampler' || type === 'texture' || type === 'cubeTexture' || type === 'storageTexture' || type === 'depthTexture' || type === 'texture3D';
 
 
 	}
 	}
 
 

+ 2 - 2
examples/jsm/renderers/webgpu/nodes/WGSLNodeFunction.js

@@ -51,8 +51,8 @@ const wgslTypeLib = {
 
 
 	'sampler': 'sampler',
 	'sampler': 'sampler',
 	'texture_2d': 'texture',
 	'texture_2d': 'texture',
-	'texture_cube': 'textureCube',
-	'texture_depth_2d': 'textureDepth',
+	'texture_cube': 'cubeTexture',
+	'texture_depth_2d': 'depthTexture',
 	'texture_storage_2d': 'storageTexture',
 	'texture_storage_2d': 'storageTexture',
 	'texture_3d': 'texture3D'
 	'texture_3d': 'texture3D'