Explorar el Código

Updated builds.

Mugen87 hace 1 año
padre
commit
58302da86d
Se han modificado 5 ficheros con 389 adiciones y 51 borrados
  1. 7 7
      build/three.cjs
  2. 7 7
      build/three.module.js
  3. 0 0
      build/three.module.min.js
  4. 375 37
      build/three.webgpu.js
  5. 0 0
      build/three.webgpu.min.js

+ 7 - 7
build/three.cjs

@@ -28407,27 +28407,27 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
 
 					const info = getUniformSize( value );
 
-					// Calculate the chunk offset
-					const chunkOffsetUniform = offset % chunkSize;
+					const chunkOffset = offset % chunkSize; // offset in the current chunk
+					const chunkPadding = chunkOffset % info.boundary; // required padding to match boundary
+					const chunkStart = chunkOffset + chunkPadding; // the start position in the current chunk for the data
+
+					offset += chunkPadding;
 
 					// Check for chunk overflow
-					if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) {
+					if ( chunkStart !== 0 && ( chunkSize - chunkStart ) < info.storage ) {
 
 						// Add padding and adjust offset
-						offset += ( chunkSize - chunkOffsetUniform );
+						offset += ( chunkSize - chunkStart );
 
 					}
 
 					// the following two properties will be used for partial buffer updates
-
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__offset = offset;
 
-
 					// Update the global offset
 					offset += info.storage;
 
-
 				}
 
 			}

+ 7 - 7
build/three.module.js

@@ -28405,27 +28405,27 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
 
 					const info = getUniformSize( value );
 
-					// Calculate the chunk offset
-					const chunkOffsetUniform = offset % chunkSize;
+					const chunkOffset = offset % chunkSize; // offset in the current chunk
+					const chunkPadding = chunkOffset % info.boundary; // required padding to match boundary
+					const chunkStart = chunkOffset + chunkPadding; // the start position in the current chunk for the data
+
+					offset += chunkPadding;
 
 					// Check for chunk overflow
-					if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) {
+					if ( chunkStart !== 0 && ( chunkSize - chunkStart ) < info.storage ) {
 
 						// Add padding and adjust offset
-						offset += ( chunkSize - chunkOffsetUniform );
+						offset += ( chunkSize - chunkStart );
 
 					}
 
 					// the following two properties will be used for partial buffer updates
-
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__offset = offset;
 
-
 					// Update the global offset
 					offset += info.storage;
 
-
 				}
 
 			}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.module.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 375 - 37
build/three.webgpu.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.webgpu.min.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio