Skip to content

Commit 6c7d807

Browse files
authored
Update WebGPUTextureUtils.js
Improve code clarity.
1 parent ab0e7cb commit 6c7d807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/webgpu/utils/WebGPUTextureUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ class WebGPUTextureUtils {
540540

541541
const readBuffer = device.createBuffer(
542542
{
543-
size: ( height - 1 ) * bytesPerRow + width * bytesPerTexel, // see https://github.com/mrdoob/three.js/issues/31658#issuecomment-3229442010
543+
size: ( ( height - 1 ) * bytesPerRow ) + ( width * bytesPerTexel ), // see https://github.com/mrdoob/three.js/issues/31658#issuecomment-3229442010
544544
usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ
545545
}
546546
);

0 commit comments

Comments
 (0)