Преглед изворни кода

Examples: fix instancedArray call in WebGPU compute reduce (#31855)

Co-authored-by: Samuel Rigaud <rigaud@gmail.com>
Samuel Rigaud пре 4 месеци
родитељ
комит
440ea54253
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      examples/webgpu_compute_reduce.html

+ 3 - 3
examples/webgpu_compute_reduce.html

@@ -936,7 +936,7 @@
 				} ) );
 
 				// Represents array of data as uints in compute shader.
-				const inputStorage = instancedArray( array, 'uint', size ).setPBO( true ).setName( `Current_${leftSideDisplay ? 'Left' : 'Right'}` );
+				const inputStorage = instancedArray( array, 'uint' ).setPBO( true ).setName( `Current_${leftSideDisplay ? 'Left' : 'Right'}` );
 				// Represents array of data as vec4s in compute shader;
 				const inputVec4BufferAttribute = new THREE.StorageInstancedBufferAttribute( array, 4 );
 				const inputVectorizedStorage = storage( inputVec4BufferAttribute, 'uvec4', vecSize ).setPBO( true ).setName( `CurrentVectorized_${leftSideDisplay ? 'Left' : 'Right'}` );
@@ -947,9 +947,9 @@
 				const rowSize = divRoundUp( size, numRows );
 
 				const workgroupSumsArray = new Uint32Array( numRows );
-				const workgroupSumsStorage = instancedArray( workgroupSumsArray, 'uint', numRows ).setPBO( true ).setName( `WorkgroupSums_${leftSideDisplay ? 'Left' : 'Right'}` );
+				const workgroupSumsStorage = instancedArray( workgroupSumsArray, 'uint' ).setPBO( true ).setName( `WorkgroupSums_${leftSideDisplay ? 'Left' : 'Right'}` );
 				const debugArray = new Uint32Array( 1024 );
-				const debugStorage = instancedArray( debugArray, 'uint', 1024 ).setPBO( true ).setName( `Debug_${leftSideDisplay ? 'Left' : 'Right'}` );
+				const debugStorage = instancedArray( debugArray, 'uint' ).setPBO( true ).setName( `Debug_${leftSideDisplay ? 'Left' : 'Right'}` );
 
 				const buffers = {
 					'Input Buffer': inputStorage,

粤ICP备19079148号