Explorar el Código

Update WebGPUTextureUtils.js

Improve code clarity.
Michael Herzog hace 5 meses
padre
commit
6c7d8077a3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/renderers/webgpu/utils/WebGPUTextureUtils.js

+ 1 - 1
src/renderers/webgpu/utils/WebGPUTextureUtils.js

@@ -540,7 +540,7 @@ class WebGPUTextureUtils {
 
 
 		const readBuffer = device.createBuffer(
 		const readBuffer = device.createBuffer(
 			{
 			{
-				size: ( height - 1 ) * bytesPerRow + width * bytesPerTexel, // see https://github.com/mrdoob/three.js/issues/31658#issuecomment-3229442010
+				size: ( ( height - 1 ) * bytesPerRow ) + ( width * bytesPerTexel ), // see https://github.com/mrdoob/three.js/issues/31658#issuecomment-3229442010
 				usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ
 				usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ
 			}
 			}
 		);
 		);

粤ICP备19079148号