Browse Source

Update WebGPUTextureUtils.js

Improve code clarity.
Michael Herzog 9 tháng trước cách đây
mục cha
commit
6c7d8077a3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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号