You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the WebGPU API, the writeBuffer command treats the last two arguments (dataOffset and size) as number of elements if the array is a TypedArray, not as number of bytes. So the multiplication by array.BYTES_PER_ELEMENT is wrong and causes the error.
As a dirty workaround until it is fixed you can just not specify an update range or divide the start and count by array.BYTES_PER_ELEMENT.
holtsetio
pushed a commit
to holtsetio/three.js
that referenced
this issue
Nov 26, 2024
Description
1 ) Create an instancedgeometry
2 ) fill it with instancedattributes
3 ) update with new values later
This works in WebGL, but not in WebGPU
This is exactly the break :
OperationError: Failed to execute 'writeBuffer' on 'GPUQueue': Number of bytes to write is too large
My guess is, once the buffer is created, it cannot be replaced ?
Live example
Live fiddle
Uncomment the line 81
Version
last
Device
Desktop
Browser
Chrome
OS
MacOS
The text was updated successfully, but these errors were encountered: