Переглянути джерело

Update WebGPUTextureUtils.js

Improve code clarity.
Michael Herzog 5 місяців тому
батько
коміт
6c7d8077a3
1 змінених файлів з 1 додано та 1 видалено
  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(
 			{
-				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
 			}
 		);

粤ICP备19079148号