Просмотр исходного кода

Revert "Merge branch 'dev' of https://github.com/mrdoob/three.js into dev"

This reverts commit 5d3d5ec9d30de972cbfb06858ef578c5823f252c, reversing
changes made to 465de053461571562e258814a304f242fde51989.
sunag 3 месяцев назад
Родитель
Сommit
7aa546b86b

+ 52 - 148
build/three.webgpu.js

@@ -8180,20 +8180,10 @@ class VarNode extends Node {
 
 
 	build( ...params ) {
 	build( ...params ) {
 
 
-		const builder = params[ 0 ];
-
-		if ( this._hasStack( builder ) === false && builder.buildStage === 'setup' ) {
-
-			if ( builder.context.nodeLoop || builder.context.nodeBlock ) {
-
-				builder.getBaseStack().addToStack( this );
-
-			}
-
-		}
-
 		if ( this.intent === true ) {
 		if ( this.intent === true ) {
 
 
+			const builder = params[ 0 ];
+
 			if ( this.isAssign( builder ) !== true ) {
 			if ( this.isAssign( builder ) !== true ) {
 
 
 				return this.node.build( ...params );
 				return this.node.build( ...params );
@@ -8273,14 +8263,6 @@ class VarNode extends Node {
 
 
 	}
 	}
 
 
-	_hasStack( builder ) {
-
-		const nodeData = builder.getDataFromNode( this );
-
-		return nodeData.stack !== undefined;
-
-	}
-
 }
 }
 
 
 /**
 /**
@@ -8330,6 +8312,12 @@ const Const = ( node, name = null ) => createVar( node, name, true ).toStack();
  */
  */
 const VarIntent = ( node ) => {
 const VarIntent = ( node ) => {
 
 
+	if ( getCurrentStack() === null ) {
+
+		return node;
+
+	}
+
 	return createVar( node ).setIntent( true ).toStack();
 	return createVar( node ).setIntent( true ).toStack();
 
 
 };
 };
@@ -17563,7 +17551,7 @@ class LoopNode extends Node {
 	 */
 	 */
 	constructor( params = [] ) {
 	constructor( params = [] ) {
 
 
-		super( 'void' );
+		super();
 
 
 		this.params = params;
 		this.params = params;
 
 
@@ -17609,20 +17597,16 @@ class LoopNode extends Node {
 
 
 		}
 		}
 
 
-		const stack = builder.addStack();
-
-		const fnCall = this.params[ this.params.length - 1 ]( inputs );
+		const stack = builder.addStack(); // TODO: cache() it
 
 
-		properties.returnsNode = fnCall.context( { nodeLoop: fnCall } );
+		properties.returnsNode = this.params[ this.params.length - 1 ]( inputs, builder );
 		properties.stackNode = stack;
 		properties.stackNode = stack;
 
 
 		const baseParam = this.params[ 0 ];
 		const baseParam = this.params[ 0 ];
 
 
 		if ( baseParam.isNode !== true && typeof baseParam.update === 'function' ) {
 		if ( baseParam.isNode !== true && typeof baseParam.update === 'function' ) {
 
 
-			const fnUpdateCall = Fn( this.params[ 0 ].update )( inputs );
-
-			properties.updateNode = fnUpdateCall.context( { nodeLoop: fnUpdateCall } );
+			properties.updateNode = Fn( this.params[ 0 ].update )( inputs );
 
 
 		}
 		}
 
 
@@ -17632,6 +17616,20 @@ class LoopNode extends Node {
 
 
 	}
 	}
 
 
+	/**
+	 * This method is overwritten since the node type is inferred based on the loop configuration.
+	 *
+	 * @param {NodeBuilder} builder - The current node builder.
+	 * @return {string} The node type.
+	 */
+	getNodeType( builder ) {
+
+		const { returnsNode } = this.getProperties( builder );
+
+		return returnsNode ? returnsNode.getNodeType( builder ) : 'void';
+
+	}
+
 	setup( builder ) {
 	setup( builder ) {
 
 
 		// setup properties
 		// setup properties
@@ -17811,7 +17809,7 @@ class LoopNode extends Node {
 
 
 		const stackSnippet = stackNode.build( builder, 'void' );
 		const stackSnippet = stackNode.build( builder, 'void' );
 
 
-		properties.returnsNode.build( builder, 'void' );
+		const returnsSnippet = properties.returnsNode ? properties.returnsNode.build( builder ) : '';
 
 
 		builder.removeFlowTab().addFlowCode( '\n' + builder.tab + stackSnippet );
 		builder.removeFlowTab().addFlowCode( '\n' + builder.tab + stackSnippet );
 
 
@@ -17823,6 +17821,8 @@ class LoopNode extends Node {
 
 
 		builder.addFlowTab();
 		builder.addFlowTab();
 
 
+		return returnsSnippet;
+
 	}
 	}
 
 
 }
 }
@@ -27510,7 +27510,7 @@ class VolumetricLightingModel extends LightingModel {
 
 
 	start( builder ) {
 	start( builder ) {
 
 
-		const { material } = builder;
+		const { material, context } = builder;
 
 
 		const startPos = property( 'vec3' );
 		const startPos = property( 'vec3' );
 		const endPos = property( 'vec3' );
 		const endPos = property( 'vec3' );
@@ -27559,13 +27559,13 @@ class VolumetricLightingModel extends LightingModel {
 
 
 				linearDepthRay.assign( linearDepth( viewZToPerspectiveDepth( positionViewRay.z, cameraNear, cameraFar ) ) );
 				linearDepthRay.assign( linearDepth( viewZToPerspectiveDepth( positionViewRay.z, cameraNear, cameraFar ) ) );
 
 
-				builder.context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
+				context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
 
 
 			}
 			}
 
 
-			builder.context.positionWorld = positionRay;
-			builder.context.shadowPositionWorld = positionRay;
-			builder.context.positionView = positionViewRay;
+			context.positionWorld = positionRay;
+			context.shadowPositionWorld = positionRay;
+			context.positionView = positionViewRay;
 
 
 			scatteringDensity.assign( 0 );
 			scatteringDensity.assign( 0 );
 
 
@@ -32683,11 +32683,12 @@ class StackNode extends Node {
 
 
 	build( builder, ...params ) {
 	build( builder, ...params ) {
 
 
+		const previousBuildStack = builder.currentStack;
 		const previousStack = getCurrentStack();
 		const previousStack = getCurrentStack();
 
 
 		setCurrentStack( this );
 		setCurrentStack( this );
 
 
-		builder.setActiveStack( this );
+		builder.currentStack = this;
 
 
 		const buildStage = builder.buildStage;
 		const buildStage = builder.buildStage;
 
 
@@ -32705,9 +32706,6 @@ class StackNode extends Node {
 
 
 			if ( buildStage === 'setup' ) {
 			if ( buildStage === 'setup' ) {
 
 
-				const nodeData = builder.getDataFromNode( node );
-				nodeData.stack = this;
-
 				node.build( builder );
 				node.build( builder );
 
 
 			} else if ( buildStage === 'analyze' ) {
 			} else if ( buildStage === 'analyze' ) {
@@ -32747,7 +32745,7 @@ class StackNode extends Node {
 
 
 		setCurrentStack( previousStack );
 		setCurrentStack( previousStack );
 
 
-		builder.removeActiveStack( this );
+		builder.currentStack = previousBuildStack;
 
 
 		return result;
 		return result;
 
 
@@ -39447,11 +39445,8 @@ class RangeNode extends Node {
 	 */
 	 */
 	getVectorLength( builder ) {
 	getVectorLength( builder ) {
 
 
-		const minNode = this.getConstNode( this.minNode );
-		const maxNode = this.getConstNode( this.maxNode );
-
-		const minLength = builder.getTypeLength( getValueType( minNode.value ) );
-		const maxLength = builder.getTypeLength( getValueType( maxNode.value ) );
+		const minLength = builder.getTypeLength( getValueType( this.minNode.value ) );
+		const maxLength = builder.getTypeLength( getValueType( this.maxNode.value ) );
 
 
 		return minLength > maxLength ? minLength : maxLength;
 		return minLength > maxLength ? minLength : maxLength;
 
 
@@ -39469,36 +39464,6 @@ class RangeNode extends Node {
 
 
 	}
 	}
 
 
-	/**
-	 * Returns a constant node from the given node by traversing it.
-	 *
-	 * @param {Node} node - The node to traverse.
-	 * @returns {Node} The constant node, if found.
-	 */
-	getConstNode( node ) {
-
-		let output = null;
-
-		node.traverse( n => {
-
-			if ( n.isConstNode === true ) {
-
-				output = n;
-
-			}
-
-		} );
-
-		if ( output === null ) {
-
-			throw new Error( 'THREE.TSL: No "ConstNode" found in node graph.' );
-
-		}
-
-		return output;
-
-	}
-
 	setup( builder ) {
 	setup( builder ) {
 
 
 		const object = builder.object;
 		const object = builder.object;
@@ -39507,11 +39472,8 @@ class RangeNode extends Node {
 
 
 		if ( object.count > 1 ) {
 		if ( object.count > 1 ) {
 
 
-			const minNode = this.getConstNode( this.minNode );
-			const maxNode = this.getConstNode( this.maxNode );
-
-			const minValue = minNode.value;
-			const maxValue = maxNode.value;
+			const minValue = this.minNode.value;
+			const maxValue = this.maxNode.value;
 
 
 			const minLength = builder.getTypeLength( getValueType( minValue ) );
 			const minLength = builder.getTypeLength( getValueType( minValue ) );
 			const maxLength = builder.getTypeLength( getValueType( maxValue ) );
 			const maxLength = builder.getTypeLength( getValueType( maxValue ) );
@@ -47933,13 +47895,13 @@ class NodeBuilder {
 		 */
 		 */
 		this.subBuildLayers = [];
 		this.subBuildLayers = [];
 
 
-
 		/**
 		/**
-		 * The active stack nodes.
+		 * The current stack of nodes.
 		 *
 		 *
-		 * @type {Array<StackNode>}
+		 * @type {?StackNode}
+		 * @default null
 		 */
 		 */
-		this.activeStacks = [];
+		this.currentStack = null;
 
 
 		/**
 		/**
 		 * The current sub-build TSL function(Fn).
 		 * The current sub-build TSL function(Fn).
@@ -49101,58 +49063,6 @@ class NodeBuilder {
 
 
 	}
 	}
 
 
-	/**
-	 * Adds an active stack to the internal stack.
-	 *
-	 * @param {StackNode} stack - The stack node to add.
-	 */
-	setActiveStack( stack ) {
-
-		this.activeStacks.push( stack );
-
-	}
-
-	/**
-	 * Removes the active stack from the internal stack.
-	 *
-	 * @param {StackNode} stack - The stack node to remove.
-	 */
-	removeActiveStack( stack ) {
-
-		if ( this.activeStacks[ this.activeStacks.length - 1 ] === stack ) {
-
-			this.activeStacks.pop();
-
-		} else {
-
-			throw new Error( 'NodeBuilder: Invalid active stack removal.' );
-
-		}
-
-	}
-
-	/**
-	 * Returns the active stack.
-	 *
-	 * @return {StackNode} The active stack.
-	 */
-	getActiveStack() {
-
-		return this.activeStacks[ this.activeStacks.length - 1 ];
-
-	}
-
-	/**
-	 * Returns the base stack.
-	 *
-	 * @return {StackNode} The base stack.
-	 */
-	getBaseStack() {
-
-		return this.activeStacks[ 0 ];
-
-	}
-
 	/**
 	/**
 	 * Adds a stack node to the internal stack.
 	 * Adds a stack node to the internal stack.
 	 *
 	 *
@@ -57707,10 +57617,10 @@ class Renderer {
 	 * if the renderer has been initialized.
 	 * if the renderer has been initialized.
 	 *
 	 *
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
 	 * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
 	 */
 	 */
 	compute( computeNodes, dispatchSize = null ) {
 	compute( computeNodes, dispatchSize = null ) {
@@ -57721,7 +57631,7 @@ class Renderer {
 
 
 			warn( 'Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead.' );
 			warn( 'Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead.' );
 
 
-			return this.computeAsync( computeNodes, dispatchSize );
+			return this.computeAsync( computeNodes );
 
 
 		}
 		}
 
 
@@ -57819,10 +57729,10 @@ class Renderer {
 	 *
 	 *
 	 * @async
 	 * @async
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 * @return {Promise} A Promise that resolve when the compute has finished.
 	 * @return {Promise} A Promise that resolve when the compute has finished.
 	 */
 	 */
 	async computeAsync( computeNodes, dispatchSize = null ) {
 	async computeAsync( computeNodes, dispatchSize = null ) {
@@ -66747,12 +66657,6 @@ class WebGLBackend extends Backend {
 
 
 			count = count[ 0 ];
 			count = count[ 0 ];
 
 
-		} else if ( count && typeof count === 'object' && count.isIndirectStorageBufferAttribute ) {
-
-			warnOnce( 'WebGLBackend.compute(): The count parameter must be a single number, not IndirectStorageBufferAttribute' );
-
-			count = computeNode.count;
-
 		}
 		}
 
 
 		if ( attributes[ 0 ].isStorageInstancedBufferAttribute ) {
 		if ( attributes[ 0 ].isStorageInstancedBufferAttribute ) {
@@ -76953,10 +76857,10 @@ class WebGPUBackend extends Backend {
 	 * @param {Node} computeNode - The compute node.
 	 * @param {Node} computeNode - The compute node.
 	 * @param {Array<BindGroup>} bindings - The bindings.
 	 * @param {Array<BindGroup>} bindings - The bindings.
 	 * @param {ComputePipeline} pipeline - The compute pipeline.
 	 * @param {ComputePipeline} pipeline - The compute pipeline.
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 */
 	 */
 	compute( computeGroup, computeNode, bindings, pipeline, dispatchSize = null ) {
 	compute( computeGroup, computeNode, bindings, pipeline, dispatchSize = null ) {
 
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.webgpu.min.js


+ 52 - 148
build/three.webgpu.nodes.js

@@ -8180,20 +8180,10 @@ class VarNode extends Node {
 
 
 	build( ...params ) {
 	build( ...params ) {
 
 
-		const builder = params[ 0 ];
-
-		if ( this._hasStack( builder ) === false && builder.buildStage === 'setup' ) {
-
-			if ( builder.context.nodeLoop || builder.context.nodeBlock ) {
-
-				builder.getBaseStack().addToStack( this );
-
-			}
-
-		}
-
 		if ( this.intent === true ) {
 		if ( this.intent === true ) {
 
 
+			const builder = params[ 0 ];
+
 			if ( this.isAssign( builder ) !== true ) {
 			if ( this.isAssign( builder ) !== true ) {
 
 
 				return this.node.build( ...params );
 				return this.node.build( ...params );
@@ -8273,14 +8263,6 @@ class VarNode extends Node {
 
 
 	}
 	}
 
 
-	_hasStack( builder ) {
-
-		const nodeData = builder.getDataFromNode( this );
-
-		return nodeData.stack !== undefined;
-
-	}
-
 }
 }
 
 
 /**
 /**
@@ -8330,6 +8312,12 @@ const Const = ( node, name = null ) => createVar( node, name, true ).toStack();
  */
  */
 const VarIntent = ( node ) => {
 const VarIntent = ( node ) => {
 
 
+	if ( getCurrentStack() === null ) {
+
+		return node;
+
+	}
+
 	return createVar( node ).setIntent( true ).toStack();
 	return createVar( node ).setIntent( true ).toStack();
 
 
 };
 };
@@ -17563,7 +17551,7 @@ class LoopNode extends Node {
 	 */
 	 */
 	constructor( params = [] ) {
 	constructor( params = [] ) {
 
 
-		super( 'void' );
+		super();
 
 
 		this.params = params;
 		this.params = params;
 
 
@@ -17609,20 +17597,16 @@ class LoopNode extends Node {
 
 
 		}
 		}
 
 
-		const stack = builder.addStack();
-
-		const fnCall = this.params[ this.params.length - 1 ]( inputs );
+		const stack = builder.addStack(); // TODO: cache() it
 
 
-		properties.returnsNode = fnCall.context( { nodeLoop: fnCall } );
+		properties.returnsNode = this.params[ this.params.length - 1 ]( inputs, builder );
 		properties.stackNode = stack;
 		properties.stackNode = stack;
 
 
 		const baseParam = this.params[ 0 ];
 		const baseParam = this.params[ 0 ];
 
 
 		if ( baseParam.isNode !== true && typeof baseParam.update === 'function' ) {
 		if ( baseParam.isNode !== true && typeof baseParam.update === 'function' ) {
 
 
-			const fnUpdateCall = Fn( this.params[ 0 ].update )( inputs );
-
-			properties.updateNode = fnUpdateCall.context( { nodeLoop: fnUpdateCall } );
+			properties.updateNode = Fn( this.params[ 0 ].update )( inputs );
 
 
 		}
 		}
 
 
@@ -17632,6 +17616,20 @@ class LoopNode extends Node {
 
 
 	}
 	}
 
 
+	/**
+	 * This method is overwritten since the node type is inferred based on the loop configuration.
+	 *
+	 * @param {NodeBuilder} builder - The current node builder.
+	 * @return {string} The node type.
+	 */
+	getNodeType( builder ) {
+
+		const { returnsNode } = this.getProperties( builder );
+
+		return returnsNode ? returnsNode.getNodeType( builder ) : 'void';
+
+	}
+
 	setup( builder ) {
 	setup( builder ) {
 
 
 		// setup properties
 		// setup properties
@@ -17811,7 +17809,7 @@ class LoopNode extends Node {
 
 
 		const stackSnippet = stackNode.build( builder, 'void' );
 		const stackSnippet = stackNode.build( builder, 'void' );
 
 
-		properties.returnsNode.build( builder, 'void' );
+		const returnsSnippet = properties.returnsNode ? properties.returnsNode.build( builder ) : '';
 
 
 		builder.removeFlowTab().addFlowCode( '\n' + builder.tab + stackSnippet );
 		builder.removeFlowTab().addFlowCode( '\n' + builder.tab + stackSnippet );
 
 
@@ -17823,6 +17821,8 @@ class LoopNode extends Node {
 
 
 		builder.addFlowTab();
 		builder.addFlowTab();
 
 
+		return returnsSnippet;
+
 	}
 	}
 
 
 }
 }
@@ -27510,7 +27510,7 @@ class VolumetricLightingModel extends LightingModel {
 
 
 	start( builder ) {
 	start( builder ) {
 
 
-		const { material } = builder;
+		const { material, context } = builder;
 
 
 		const startPos = property( 'vec3' );
 		const startPos = property( 'vec3' );
 		const endPos = property( 'vec3' );
 		const endPos = property( 'vec3' );
@@ -27559,13 +27559,13 @@ class VolumetricLightingModel extends LightingModel {
 
 
 				linearDepthRay.assign( linearDepth( viewZToPerspectiveDepth( positionViewRay.z, cameraNear, cameraFar ) ) );
 				linearDepthRay.assign( linearDepth( viewZToPerspectiveDepth( positionViewRay.z, cameraNear, cameraFar ) ) );
 
 
-				builder.context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
+				context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
 
 
 			}
 			}
 
 
-			builder.context.positionWorld = positionRay;
-			builder.context.shadowPositionWorld = positionRay;
-			builder.context.positionView = positionViewRay;
+			context.positionWorld = positionRay;
+			context.shadowPositionWorld = positionRay;
+			context.positionView = positionViewRay;
 
 
 			scatteringDensity.assign( 0 );
 			scatteringDensity.assign( 0 );
 
 
@@ -32683,11 +32683,12 @@ class StackNode extends Node {
 
 
 	build( builder, ...params ) {
 	build( builder, ...params ) {
 
 
+		const previousBuildStack = builder.currentStack;
 		const previousStack = getCurrentStack();
 		const previousStack = getCurrentStack();
 
 
 		setCurrentStack( this );
 		setCurrentStack( this );
 
 
-		builder.setActiveStack( this );
+		builder.currentStack = this;
 
 
 		const buildStage = builder.buildStage;
 		const buildStage = builder.buildStage;
 
 
@@ -32705,9 +32706,6 @@ class StackNode extends Node {
 
 
 			if ( buildStage === 'setup' ) {
 			if ( buildStage === 'setup' ) {
 
 
-				const nodeData = builder.getDataFromNode( node );
-				nodeData.stack = this;
-
 				node.build( builder );
 				node.build( builder );
 
 
 			} else if ( buildStage === 'analyze' ) {
 			} else if ( buildStage === 'analyze' ) {
@@ -32747,7 +32745,7 @@ class StackNode extends Node {
 
 
 		setCurrentStack( previousStack );
 		setCurrentStack( previousStack );
 
 
-		builder.removeActiveStack( this );
+		builder.currentStack = previousBuildStack;
 
 
 		return result;
 		return result;
 
 
@@ -39447,11 +39445,8 @@ class RangeNode extends Node {
 	 */
 	 */
 	getVectorLength( builder ) {
 	getVectorLength( builder ) {
 
 
-		const minNode = this.getConstNode( this.minNode );
-		const maxNode = this.getConstNode( this.maxNode );
-
-		const minLength = builder.getTypeLength( getValueType( minNode.value ) );
-		const maxLength = builder.getTypeLength( getValueType( maxNode.value ) );
+		const minLength = builder.getTypeLength( getValueType( this.minNode.value ) );
+		const maxLength = builder.getTypeLength( getValueType( this.maxNode.value ) );
 
 
 		return minLength > maxLength ? minLength : maxLength;
 		return minLength > maxLength ? minLength : maxLength;
 
 
@@ -39469,36 +39464,6 @@ class RangeNode extends Node {
 
 
 	}
 	}
 
 
-	/**
-	 * Returns a constant node from the given node by traversing it.
-	 *
-	 * @param {Node} node - The node to traverse.
-	 * @returns {Node} The constant node, if found.
-	 */
-	getConstNode( node ) {
-
-		let output = null;
-
-		node.traverse( n => {
-
-			if ( n.isConstNode === true ) {
-
-				output = n;
-
-			}
-
-		} );
-
-		if ( output === null ) {
-
-			throw new Error( 'THREE.TSL: No "ConstNode" found in node graph.' );
-
-		}
-
-		return output;
-
-	}
-
 	setup( builder ) {
 	setup( builder ) {
 
 
 		const object = builder.object;
 		const object = builder.object;
@@ -39507,11 +39472,8 @@ class RangeNode extends Node {
 
 
 		if ( object.count > 1 ) {
 		if ( object.count > 1 ) {
 
 
-			const minNode = this.getConstNode( this.minNode );
-			const maxNode = this.getConstNode( this.maxNode );
-
-			const minValue = minNode.value;
-			const maxValue = maxNode.value;
+			const minValue = this.minNode.value;
+			const maxValue = this.maxNode.value;
 
 
 			const minLength = builder.getTypeLength( getValueType( minValue ) );
 			const minLength = builder.getTypeLength( getValueType( minValue ) );
 			const maxLength = builder.getTypeLength( getValueType( maxValue ) );
 			const maxLength = builder.getTypeLength( getValueType( maxValue ) );
@@ -47933,13 +47895,13 @@ class NodeBuilder {
 		 */
 		 */
 		this.subBuildLayers = [];
 		this.subBuildLayers = [];
 
 
-
 		/**
 		/**
-		 * The active stack nodes.
+		 * The current stack of nodes.
 		 *
 		 *
-		 * @type {Array<StackNode>}
+		 * @type {?StackNode}
+		 * @default null
 		 */
 		 */
-		this.activeStacks = [];
+		this.currentStack = null;
 
 
 		/**
 		/**
 		 * The current sub-build TSL function(Fn).
 		 * The current sub-build TSL function(Fn).
@@ -49101,58 +49063,6 @@ class NodeBuilder {
 
 
 	}
 	}
 
 
-	/**
-	 * Adds an active stack to the internal stack.
-	 *
-	 * @param {StackNode} stack - The stack node to add.
-	 */
-	setActiveStack( stack ) {
-
-		this.activeStacks.push( stack );
-
-	}
-
-	/**
-	 * Removes the active stack from the internal stack.
-	 *
-	 * @param {StackNode} stack - The stack node to remove.
-	 */
-	removeActiveStack( stack ) {
-
-		if ( this.activeStacks[ this.activeStacks.length - 1 ] === stack ) {
-
-			this.activeStacks.pop();
-
-		} else {
-
-			throw new Error( 'NodeBuilder: Invalid active stack removal.' );
-
-		}
-
-	}
-
-	/**
-	 * Returns the active stack.
-	 *
-	 * @return {StackNode} The active stack.
-	 */
-	getActiveStack() {
-
-		return this.activeStacks[ this.activeStacks.length - 1 ];
-
-	}
-
-	/**
-	 * Returns the base stack.
-	 *
-	 * @return {StackNode} The base stack.
-	 */
-	getBaseStack() {
-
-		return this.activeStacks[ 0 ];
-
-	}
-
 	/**
 	/**
 	 * Adds a stack node to the internal stack.
 	 * Adds a stack node to the internal stack.
 	 *
 	 *
@@ -57707,10 +57617,10 @@ class Renderer {
 	 * if the renderer has been initialized.
 	 * if the renderer has been initialized.
 	 *
 	 *
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
 	 * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
 	 */
 	 */
 	compute( computeNodes, dispatchSize = null ) {
 	compute( computeNodes, dispatchSize = null ) {
@@ -57721,7 +57631,7 @@ class Renderer {
 
 
 			warn( 'Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead.' );
 			warn( 'Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead.' );
 
 
-			return this.computeAsync( computeNodes, dispatchSize );
+			return this.computeAsync( computeNodes );
 
 
 		}
 		}
 
 
@@ -57819,10 +57729,10 @@ class Renderer {
 	 *
 	 *
 	 * @async
 	 * @async
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
 	 * @param {Node|Array<Node>} computeNodes - The compute node(s).
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 * @return {Promise} A Promise that resolve when the compute has finished.
 	 * @return {Promise} A Promise that resolve when the compute has finished.
 	 */
 	 */
 	async computeAsync( computeNodes, dispatchSize = null ) {
 	async computeAsync( computeNodes, dispatchSize = null ) {
@@ -66747,12 +66657,6 @@ class WebGLBackend extends Backend {
 
 
 			count = count[ 0 ];
 			count = count[ 0 ];
 
 
-		} else if ( count && typeof count === 'object' && count.isIndirectStorageBufferAttribute ) {
-
-			warnOnce( 'WebGLBackend.compute(): The count parameter must be a single number, not IndirectStorageBufferAttribute' );
-
-			count = computeNode.count;
-
 		}
 		}
 
 
 		if ( attributes[ 0 ].isStorageInstancedBufferAttribute ) {
 		if ( attributes[ 0 ].isStorageInstancedBufferAttribute ) {
@@ -76953,10 +76857,10 @@ class WebGPUBackend extends Backend {
 	 * @param {Node} computeNode - The compute node.
 	 * @param {Node} computeNode - The compute node.
 	 * @param {Array<BindGroup>} bindings - The bindings.
 	 * @param {Array<BindGroup>} bindings - The bindings.
 	 * @param {ComputePipeline} pipeline - The compute pipeline.
 	 * @param {ComputePipeline} pipeline - The compute pipeline.
-	 * @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
+	 * @param {number|Array<number>|GPUBuffer} [dispatchSize=null]
 	 * - A single number representing count, or
 	 * - A single number representing count, or
 	 * - An array [x, y, z] representing dispatch size, or
 	 * - An array [x, y, z] representing dispatch size, or
-	 * - A IndirectStorageBufferAttribute for indirect dispatch size.
+	 * - A GPUBuffer for indirect dispatch size.
 	 */
 	 */
 	compute( computeGroup, computeNode, bindings, pipeline, dispatchSize = null ) {
 	compute( computeGroup, computeNode, bindings, pipeline, dispatchSize = null ) {
 
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.webgpu.nodes.min.js


+ 1 - 1
docs/pages/FileLoader.html

@@ -46,7 +46,7 @@ const data = await loader.loadAsync( 'example.txt' );
 					<h3 class="name" id="mimeType" translate="no">.<a href="#mimeType">mimeType</a><span class="type-signature"> : string</span> </h3>
 					<h3 class="name" id="mimeType" translate="no">.<a href="#mimeType">mimeType</a><span class="type-signature"> : string</span> </h3>
 					<div class="description">
 					<div class="description">
 						<p>The expected mime type. Valid values can be found
 						<p>The expected mime type. Valid values can be found
-<a href="hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype">here</a></p>
+here</p>
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="member">
 				<div class="member">

+ 0 - 37
docs/pages/FunctionOverloadingNode.html

@@ -62,23 +62,6 @@ call, the node picks the best-fit overloaded version.</p></div>
 					</div>
 					</div>
 				</div>
 				</div>
 				<h2 class="subsection-title">Methods</h2>
 				<h2 class="subsection-title">Methods</h2>
-					<h3 class="name name-method" id="getCandidateFn" translate="no">.<a href="#getCandidateFn">getCandidateFn</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="FunctionNode.html">FunctionNode</a></span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Returns the candidate function for the current parameters.</p>
-						</div>
-						<table class="params">
-							<tbody>
-								<tr>
-									<td class="name"><code>builder</code></td>
-									<td class="description last"><p>The current node builder.</p></td>
-								</tr>
-							</tbody>
-						</table>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> The candidate function.</dt>
-						</dl>
-					</div>
 					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
 					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
@@ -100,26 +83,6 @@ the function's return type.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Sets up the node for the current parameters.</p>
-						</div>
-						<table class="params">
-							<tbody>
-								<tr>
-									<td class="name"><code>builder</code></td>
-									<td class="description last"><p>The current node builder.</p></td>
-								</tr>
-							</tbody>
-						</table>
-						<dl class="details">
-							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#setup">Node#setup</a></dt>
-						</dl>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> The setup node.</dt>
-						</dl>
-					</div>
 				<h2 class="subsection-title">Source</h2>
 				<h2 class="subsection-title">Source</h2>
 				<p>
 				<p>
 					<a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/FunctionOverloadingNode.js" target="_blank" rel="noopener" translate="no">src/nodes/utils/FunctionOverloadingNode.js</a>
 					<a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/FunctionOverloadingNode.js" target="_blank" rel="noopener" translate="no">src/nodes/utils/FunctionOverloadingNode.js</a>

+ 6 - 1
docs/pages/GLTFLoader.html

@@ -14,7 +14,12 @@
 		<section>
 		<section>
 			<header>
 			<header>
 				<div class="class-description"><p>A loader for the glTF 2.0 format.</p>
 				<div class="class-description"><p>A loader for the glTF 2.0 format.</p>
-<p>[glTF](https://www.khronos.org/gltf/} (GL Transmission Format) is an <a href="https://github.com/KhronosGroup/glTF/tree/main/specification/2.0)">open format specification</a> whenever possible. Be advised that image bitmaps are not
+<p><a href="https://www.khronos.org/gltf/">glTF</a> (GL Transmission Format) is an <a href="https://github.com/KhronosGroup/glTF/tree/main/specification/2.0">open format specification</a>
+for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb)
+format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver
+one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights,
+and/or cameras.</p>
+<p><code>GLTFLoader</code> uses <a href="ImageBitmapLoader.html">ImageBitmapLoader</a> whenever possible. Be advised that image bitmaps are not
 automatically GC-collected when they are no longer referenced, and they require special handling during
 automatically GC-collected when they are no longer referenced, and they require special handling during
 the disposal process.</p>
 the disposal process.</p>
 <p><code>GLTFLoader</code> supports the following glTF 2.0 extensions:</p>
 <p><code>GLTFLoader</code> supports the following glTF 2.0 extensions:</p>

+ 28 - 1
docs/pages/LDrawLoader.html

@@ -14,7 +14,34 @@
 		<section>
 		<section>
 			<header>
 			<header>
 				<div class="class-description"><p>A loader for the LDraw format.</p>
 				<div class="class-description"><p>A loader for the LDraw format.</p>
-<p>[LDraw](https://ldraw.org/} (LEGO Draw) is an <a href="https://ldraw.org/article/218.html)">open format specification</a> from 'three/addons/loaders/LDrawLoader.js';</code></pre>
+<p><a href="https://ldraw.org/">LDraw</a> (LEGO Draw) is an <a href="https://ldraw.org/article/218.html">open format specification</a>
+for describing LEGO and other construction set 3D models.</p>
+<p>An LDraw asset (a text file usually with extension .ldr, .dat or .txt) can describe just a single construction
+piece, or an entire model. In the case of a model the LDraw file can reference other LDraw files, which are
+loaded from a library path set with <code>setPartsLibraryPath</code>. You usually download the LDraw official parts library,
+extract to a folder and point setPartsLibraryPath to it.</p>
+<p>Library parts will be loaded by trial and error in subfolders 'parts', 'p' and 'models'. These file accesses
+are not optimal for web environment, so a script tool has been made to pack an LDraw file with all its dependencies
+into a single file, which loads much faster. See section 'Packing LDraw models'. The LDrawLoader example loads
+several packed files. The official parts library is not included due to its large size.</p>
+<p><code>LDrawLoader</code> supports the following extensions:</p>
+<ul>
+<li>!COLOUR: Color and surface finish declarations.</li>
+<li>BFC: Back Face Culling specification.</li>
+<li>!CATEGORY: Model/part category declarations.</li>
+<li>!KEYWORDS: Model/part keywords declarations.</li>
+</ul></div>
+				<h2>Code Example</h2>
+				<div translate="no"><pre><code class="language-js">const loader = new LDrawLoader();
+loader.setConditionalLineMaterial( LDrawConditionalLineMaterial ); // the type of line material depends on the used renderer
+const object = await loader.loadAsync( 'models/ldraw/officialLibrary/models/car.ldr_Packed.mpd' );
+scene.add( object );
+</code></pre></div>
+			</header>
+			<article>
+				<h2 class="subsection-title">Import</h2>
+				<p><span translate="no">LDrawLoader</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
+				<pre><code class="language-js">import { LDrawLoader } from 'three/addons/loaders/LDrawLoader.js';</code></pre>
 				<div class="container-overview">
 				<div class="container-overview">
 					<h2>Constructor</h2>
 					<h2>Constructor</h2>
 					<h3 class="name name-method" id="LDrawLoader" translate="no">new <a href="#LDrawLoader">LDrawLoader</a><span class="signature">( manager : <span class="param-type">LoadingManager</span> )</span> </h3>
 					<h3 class="name name-method" id="LDrawLoader" translate="no">new <a href="#LDrawLoader">LDrawLoader</a><span class="signature">( manager : <span class="param-type">LoadingManager</span> )</span> </h3>

+ 20 - 0
docs/pages/LoopNode.html

@@ -56,6 +56,26 @@ Loop( value.lessThan( 10 ), () => {
 					</div>
 					</div>
 				</div>
 				</div>
 				<h2 class="subsection-title">Methods</h2>
 				<h2 class="subsection-title">Methods</h2>
+					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>This method is overwritten since the node type is inferred based on the loop configuration.</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name"><code>builder</code></td>
+									<td class="description last"><p>The current node builder.</p></td>
+								</tr>
+							</tbody>
+						</table>
+						<dl class="details">
+							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Node.html#getNodeType">Node#getNodeType</a></dt>
+						</dl>
+						<dl class="details">
+							<dt class="tag-returns"><strong>Returns:</strong> The node type.</dt>
+						</dl>
+					</div>
 					<h3 class="name name-method" id="getProperties" translate="no">.<a href="#getProperties">getProperties</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : Object</span> </h3>
 					<h3 class="name name-method" id="getProperties" translate="no">.<a href="#getProperties">getProperties</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : Object</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">

+ 6 - 61
docs/pages/NodeBuilder.html

@@ -42,12 +42,6 @@ on a 3D object and its node material definition.</p></div>
 					</div>
 					</div>
 				</div>
 				</div>
 				<h2 class="subsection-title">Properties</h2>
 				<h2 class="subsection-title">Properties</h2>
-				<div class="member">
-					<h3 class="name" id="activeStacks" translate="no">.<a href="#activeStacks">activeStacks</a><span class="type-signature"> : Array.&lt;<a href="StackNode.html">StackNode</a>></span> </h3>
-					<div class="description">
-						<p>The active stack nodes.</p>
-					</div>
-				</div>
 				<div class="member">
 				<div class="member">
 					<h3 class="name" id="attributes" translate="no">.<a href="#attributes">attributes</a><span class="type-signature"> : Array.&lt;<a href="NodeAttribute.html">NodeAttribute</a>></span> </h3>
 					<h3 class="name" id="attributes" translate="no">.<a href="#attributes">attributes</a><span class="type-signature"> : Array.&lt;<a href="NodeAttribute.html">NodeAttribute</a>></span> </h3>
 					<div class="description">
 					<div class="description">
@@ -143,6 +137,12 @@ The codes are maintained in an array for each shader stage.</p>
 last node in the chain of nodes.</p>
 last node in the chain of nodes.</p>
 					</div>
 					</div>
 				</div>
 				</div>
+				<div class="member">
+					<h3 class="name" id="currentStack" translate="no">.<a href="#currentStack">currentStack</a><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
+					<div class="description">
+						<p>The current stack of nodes.<br/>Default is <code>null</code>.</p>
+					</div>
+				</div>
 				<div class="member">
 				<div class="member">
 					<h3 class="name" id="declarations" translate="no">.<a href="#declarations">declarations</a><span class="type-signature"> : Object</span> </h3>
 					<h3 class="name" id="declarations" translate="no">.<a href="#declarations">declarations</a><span class="type-signature"> : Object</span> </h3>
 					<div class="description">
 					<div class="description">
@@ -1026,15 +1026,6 @@ this method might be used to convert a simple float string <code>&quot;1.0&quot;
 							<dt class="tag-returns"><strong>Returns:</strong> The generated shader string.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> The generated shader string.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="getActiveStack" translate="no">.<a href="#getActiveStack">getActiveStack</a><span class="signature">()</span><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Returns the active stack.</p>
-						</div>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> The active stack.</dt>
-						</dl>
-					</div>
 					<h3 class="name name-method" id="getAttribute" translate="no">.<a href="#getAttribute">getAttribute</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="NodeAttribute.html">NodeAttribute</a></span> </h3>
 					<h3 class="name name-method" id="getAttribute" translate="no">.<a href="#getAttribute">getAttribute</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="NodeAttribute.html">NodeAttribute</a></span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
@@ -1082,15 +1073,6 @@ this method might be used to convert a simple float string <code>&quot;1.0&quot;
 							<dt class="tag-returns"><strong>Returns:</strong> The node attributes of this builder.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> The node attributes of this builder.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="getBaseStack" translate="no">.<a href="#getBaseStack">getBaseStack</a><span class="signature">()</span><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Returns the base stack.</p>
-						</div>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> The base stack.</dt>
-						</dl>
-					</div>
 					<h3 class="name name-method" id="getBindGroupArray" translate="no">.<a href="#getBindGroupArray">getBindGroupArray</a><span class="signature">( groupName : <span class="param-type">string</span>, shaderStage : <span class="param-type">'vertex' | 'fragment' | 'compute' | 'any'</span> )</span><span class="type-signature"> : Array.&lt;<a href="NodeUniformsGroup.html">NodeUniformsGroup</a>></span> </h3>
 					<h3 class="name name-method" id="getBindGroupArray" translate="no">.<a href="#getBindGroupArray">getBindGroupArray</a><span class="signature">( groupName : <span class="param-type">string</span>, shaderStage : <span class="param-type">'vertex' | 'fragment' | 'compute' | 'any'</span> )</span><span class="type-signature"> : Array.&lt;<a href="NodeUniformsGroup.html">NodeUniformsGroup</a>></span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
@@ -2165,15 +2147,6 @@ this method evaluate to <code>true</code>, WebGPU to <code>false</code>.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> Whether the given type is a matrix type or not.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> Whether the given type is a matrix type or not.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="isOpaque" translate="no">.<a href="#isOpaque">isOpaque</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Whether the material is opaque or not.</p>
-						</div>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> Whether the material is opaque or not.</dt>
-						</dl>
-					</div>
 					<h3 class="name name-method" id="isReference" translate="no">.<a href="#isReference">isReference</a><span class="signature">( type : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
 					<h3 class="name name-method" id="isReference" translate="no">.<a href="#isReference">isReference</a><span class="signature">( type : <span class="param-type">string</span> )</span><span class="type-signature"> : boolean</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
@@ -2239,20 +2212,6 @@ this method evaluate to <code>true</code>, WebGPU to <code>false</code>.</p>
 							</tbody>
 							</tbody>
 						</table>
 						</table>
 					</div>
 					</div>
-					<h3 class="name name-method" id="removeActiveStack" translate="no">.<a href="#removeActiveStack">removeActiveStack</a><span class="signature">( stack : <span class="param-type">StackNode</span> )</span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Removes the active stack from the internal stack.</p>
-						</div>
-						<table class="params">
-							<tbody>
-								<tr>
-									<td class="name"><code>stack</code></td>
-									<td class="description last"><p>The stack node to remove.</p></td>
-								</tr>
-							</tbody>
-						</table>
-					</div>
 					<h3 class="name name-method" id="removeChain" translate="no">.<a href="#removeChain">removeChain</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
 					<h3 class="name name-method" id="removeChain" translate="no">.<a href="#removeChain">removeChain</a><span class="signature">( node : <span class="param-type">Node</span> )</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
@@ -2294,20 +2253,6 @@ this method evaluate to <code>true</code>, WebGPU to <code>false</code>.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> The removed sub-build layer.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> The removed sub-build layer.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="setActiveStack" translate="no">.<a href="#setActiveStack">setActiveStack</a><span class="signature">( stack : <span class="param-type">StackNode</span> )</span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Adds an active stack to the internal stack.</p>
-						</div>
-						<table class="params">
-							<tbody>
-								<tr>
-									<td class="name"><code>stack</code></td>
-									<td class="description last"><p>The stack node to add.</p></td>
-								</tr>
-							</tbody>
-						</table>
-					</div>
 					<h3 class="name name-method" id="setBuildStage" translate="no">.<a href="#setBuildStage">setBuildStage</a><span class="signature">( buildStage : <span class="param-type">'setup' | 'analyze' | 'generate'</span> )</span> </h3>
 					<h3 class="name name-method" id="setBuildStage" translate="no">.<a href="#setBuildStage">setBuildStage</a><span class="signature">( buildStage : <span class="param-type">'setup' | 'analyze' | 'generate'</span> )</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">

+ 2 - 4
docs/pages/PMREMGenerator.html

@@ -21,10 +21,8 @@ chain, it only goes down to the LOD_MIN level (above), and then creates extra
 even more filtered 'mips' at the same LOD_MIN resolution, associated with
 even more filtered 'mips' at the same LOD_MIN resolution, associated with
 higher roughness levels. In this way we maintain resolution to smoothly
 higher roughness levels. In this way we maintain resolution to smoothly
 interpolate diffuse lighting while limiting sampling computation.</p>
 interpolate diffuse lighting while limiting sampling computation.</p>
-<p>The prefiltering uses GGX VNDF (Visible Normal Distribution Function)
-importance sampling based on &quot;Sampling the GGX Distribution of Visible Normals&quot;
-(Heitz, 2018) to generate environment maps that accurately match the GGX BRDF
-used in material rendering for physically-based image-based lighting.</p></div>
+<p>Paper: Fast, Accurate Image-Based Lighting:
+<a href="https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view">https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view</a></p></div>
 			</header>
 			</header>
 			<article>
 			<article>
 				<div class="container-overview">
 				<div class="container-overview">

+ 0 - 17
docs/pages/RangeNode.html

@@ -58,23 +58,6 @@ const mesh = new InstancedMesh( geometry, material, count );
 					</div>
 					</div>
 				</div>
 				</div>
 				<h2 class="subsection-title">Methods</h2>
 				<h2 class="subsection-title">Methods</h2>
-					<h3 class="name name-method" id="getConstNode" translate="no">.<a href="#getConstNode">getConstNode</a><span class="signature">( node : <span class="param-type">Node</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
-					<div class="method">
-						<div class="description">
-							<p>Returns a constant node from the given node by traversing it.</p>
-						</div>
-						<table class="params">
-							<tbody>
-								<tr>
-									<td class="name"><code>node</code></td>
-									<td class="description last"><p>The node to traverse.</p></td>
-								</tr>
-							</tbody>
-						</table>
-						<dl class="details">
-							<dt class="tag-returns"><strong>Returns:</strong> The constant node, if found.</dt>
-						</dl>
-					</div>
 					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
 					<h3 class="name name-method" id="getNodeType" translate="no">.<a href="#getNodeType">getNodeType</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : string</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">

+ 6 - 14
docs/pages/Renderer.html

@@ -530,7 +530,7 @@ and environment must be configured before calling this method.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> A Promise that resolves when the compile has been finished.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> A Promise that resolves when the compile has been finished.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="compute" translate="no">.<a href="#compute">compute</a><span class="signature">( computeNodes : <span class="param-type">Node | Array.&lt;Node></span>, dispatchSize : <span class="param-type">number | Array.&lt;number> | IndirectStorageBufferAttribute</span> )</span><span class="type-signature"> : Promise | undefined</span> </h3>
+					<h3 class="name name-method" id="compute" translate="no">.<a href="#compute">compute</a><span class="signature">( computeNodes : <span class="param-type">Node | Array.&lt;Node></span>, dispatchSizeOrCount : <span class="param-type">Array.&lt;number> | number</span> )</span><span class="type-signature"> : Promise | undefined</span> </h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
 							<p>Execute a single or an array of compute nodes. This method can only be called
 							<p>Execute a single or an array of compute nodes. This method can only be called
@@ -543,12 +543,8 @@ if the renderer has been initialized.</p>
 									<td class="description last"><p>The compute node(s).</p></td>
 									<td class="description last"><p>The compute node(s).</p></td>
 								</tr>
 								</tr>
 								<tr>
 								<tr>
-									<td class="name"><code>dispatchSize</code></td>
-									<td class="description last"><ul>
-<li>A single number representing count, or</li>
-<li>An array [x, y, z] representing dispatch size, or</li>
-<li>A IndirectStorageBufferAttribute for indirect dispatch size.</li>
-</ul><br/>Default is <code>null</code>.</td>
+									<td class="name"><code>dispatchSizeOrCount</code></td>
+									<td class="description last"><p>Array with [ x, y, z ] values for dispatch or a single number for the count.<br/>Default is <code>null</code>.</p></td>
 								</tr>
 								</tr>
 							</tbody>
 							</tbody>
 						</table>
 						</table>
@@ -556,7 +552,7 @@ if the renderer has been initialized.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.</dt>
 							<dt class="tag-returns"><strong>Returns:</strong> A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.</dt>
 						</dl>
 						</dl>
 					</div>
 					</div>
-					<h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNodes : <span class="param-type">Node | Array.&lt;Node></span>, dispatchSize : <span class="param-type">number | Array.&lt;number> | IndirectStorageBufferAttribute</span> )</span><span class="type-signature"> : Promise</span> <span class="type-signature">(async) </span></h3>
+					<h3 class="name name-method" id="computeAsync" translate="no">.<a href="#computeAsync">computeAsync</a><span class="signature">( computeNodes : <span class="param-type">Node | Array.&lt;Node></span>, dispatchSizeOrCount : <span class="param-type">Array.&lt;number> | number</span> )</span><span class="type-signature"> : Promise</span> <span class="type-signature">(async) </span></h3>
 					<div class="method">
 					<div class="method">
 						<div class="description">
 						<div class="description">
 							<p>Execute a single or an array of compute nodes.</p>
 							<p>Execute a single or an array of compute nodes.</p>
@@ -568,12 +564,8 @@ if the renderer has been initialized.</p>
 									<td class="description last"><p>The compute node(s).</p></td>
 									<td class="description last"><p>The compute node(s).</p></td>
 								</tr>
 								</tr>
 								<tr>
 								<tr>
-									<td class="name"><code>dispatchSize</code></td>
-									<td class="description last"><ul>
-<li>A single number representing count, or</li>
-<li>An array [x, y, z] representing dispatch size, or</li>
-<li>A IndirectStorageBufferAttribute for indirect dispatch size.</li>
-</ul><br/>Default is <code>null</code>.</td>
+									<td class="name"><code>dispatchSizeOrCount</code></td>
+									<td class="description last"><p>Array with [ x, y, z ] values for dispatch or a single number for the count.<br/>Default is <code>null</code>.</p></td>
 								</tr>
 								</tr>
 							</tbody>
 							</tbody>
 						</table>
 						</table>

+ 1 - 1
docs/pages/module-GTAOShader.html

@@ -39,7 +39,7 @@
 <p>References:</p>
 <p>References:</p>
 <ul>
 <ul>
 <li><a href="https://iryoku.com/downloads/Practical-Realtime-Strategies-for-Accurate-Indirect-Occlusion.pdf">Practical Realtime Strategies for Accurate Indirect Occlusion</a>.</li>
 <li><a href="https://iryoku.com/downloads/Practical-Realtime-Strategies-for-Accurate-Indirect-Occlusion.pdf">Practical Realtime Strategies for Accurate Indirect Occlusion</a>.</li>
-<li><a href="https://github.com/Patapom/GodComplex/blob/master/Tests/TestHBIL/2018%20Mayaux%20-%20Horizon-Based%20Indirect%20Lighting%20(HBIL).pdf">Horizon-Based Indirect Lighting (HBIL)</a></li>
+<li><a href="https://github.com/Patapom/GodComplex/blob/master/Tests/TestHBIL/2018%2520Mayaux%2520-%2520Horizon-Based%2520Indirect%2520Lighting%2520(HBIL).pdf">Horizon-Based Indirect Lighting (HBIL)</a></li>
 </ul>
 </ul>
 					</div>
 					</div>
 				</div>
 				</div>

+ 8 - 36
docs/search.json

@@ -3592,10 +3592,6 @@
 			"title": "FunctionOverloadingNode#functionNodes",
 			"title": "FunctionOverloadingNode#functionNodes",
 			"kind": "member"
 			"kind": "member"
 		},
 		},
-		{
-			"title": "FunctionOverloadingNode#getCandidateFn",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "FunctionOverloadingNode#getNodeType",
 			"title": "FunctionOverloadingNode#getNodeType",
 			"kind": "function"
 			"kind": "function"
@@ -3608,10 +3604,6 @@
 			"title": "FunctionOverloadingNode#parametersNodes",
 			"title": "FunctionOverloadingNode#parametersNodes",
 			"kind": "member"
 			"kind": "member"
 		},
 		},
-		{
-			"title": "FunctionOverloadingNode#setup",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "GLBufferAttribute",
 			"title": "GLBufferAttribute",
 			"kind": "class"
 			"kind": "class"
@@ -5484,6 +5476,10 @@
 			"title": "LoopNode",
 			"title": "LoopNode",
 			"kind": "class"
 			"kind": "class"
 		},
 		},
+		{
+			"title": "LoopNode#getNodeType",
+			"kind": "function"
+		},
 		{
 		{
 			"title": "LoopNode#getProperties",
 			"title": "LoopNode#getProperties",
 			"kind": "function"
 			"kind": "function"
@@ -7688,10 +7684,6 @@
 			"title": "NodeBuilder",
 			"title": "NodeBuilder",
 			"kind": "class"
 			"kind": "class"
 		},
 		},
-		{
-			"title": "NodeBuilder#activeStacks",
-			"kind": "member"
-		},
 		{
 		{
 			"title": "NodeBuilder#addChain",
 			"title": "NodeBuilder#addChain",
 			"kind": "function"
 			"kind": "function"
@@ -7836,6 +7828,10 @@
 			"title": "NodeBuilder#currentNode",
 			"title": "NodeBuilder#currentNode",
 			"kind": "member"
 			"kind": "member"
 		},
 		},
+		{
+			"title": "NodeBuilder#currentStack",
+			"kind": "member"
+		},
 		{
 		{
 			"title": "NodeBuilder#declarations",
 			"title": "NodeBuilder#declarations",
 			"kind": "member"
 			"kind": "member"
@@ -7924,10 +7920,6 @@
 			"title": "NodeBuilder#geometry",
 			"title": "NodeBuilder#geometry",
 			"kind": "member"
 			"kind": "member"
 		},
 		},
-		{
-			"title": "NodeBuilder#getActiveStack",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "NodeBuilder#getAttribute",
 			"title": "NodeBuilder#getAttribute",
 			"kind": "function"
 			"kind": "function"
@@ -7940,10 +7932,6 @@
 			"title": "NodeBuilder#getAttributesArray",
 			"title": "NodeBuilder#getAttributesArray",
 			"kind": "function"
 			"kind": "function"
 		},
 		},
-		{
-			"title": "NodeBuilder#getBaseStack",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "NodeBuilder#getBindGroupArray",
 			"title": "NodeBuilder#getBindGroupArray",
 			"kind": "function"
 			"kind": "function"
@@ -8200,10 +8188,6 @@
 			"title": "NodeBuilder#isMatrix",
 			"title": "NodeBuilder#isMatrix",
 			"kind": "function"
 			"kind": "function"
 		},
 		},
-		{
-			"title": "NodeBuilder#isOpaque",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "NodeBuilder#isReference",
 			"title": "NodeBuilder#isReference",
 			"kind": "function"
 			"kind": "function"
@@ -8244,10 +8228,6 @@
 			"title": "NodeBuilder#registerDeclaration",
 			"title": "NodeBuilder#registerDeclaration",
 			"kind": "function"
 			"kind": "function"
 		},
 		},
-		{
-			"title": "NodeBuilder#removeActiveStack",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "NodeBuilder#removeChain",
 			"title": "NodeBuilder#removeChain",
 			"kind": "function"
 			"kind": "function"
@@ -8276,10 +8256,6 @@
 			"title": "NodeBuilder#sequentialNodes",
 			"title": "NodeBuilder#sequentialNodes",
 			"kind": "member"
 			"kind": "member"
 		},
 		},
-		{
-			"title": "NodeBuilder#setActiveStack",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "NodeBuilder#setBuildStage",
 			"title": "NodeBuilder#setBuildStage",
 			"kind": "function"
 			"kind": "function"
@@ -10708,10 +10684,6 @@
 			"title": "RangeNode",
 			"title": "RangeNode",
 			"kind": "class"
 			"kind": "class"
 		},
 		},
-		{
-			"title": "RangeNode#getConstNode",
-			"kind": "function"
-		},
 		{
 		{
 			"title": "RangeNode#getNodeType",
 			"title": "RangeNode#getNodeType",
 			"kind": "function"
 			"kind": "function"

Некоторые файлы не были показаны из-за большого количества измененных файлов

粤ICP备19079148号