We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b9c0f3 + 1913eab commit 73c6685Copy full SHA for 73c6685
examples/jsm/renderers/webgpu/WebGPUAttributes.js
@@ -64,7 +64,7 @@ class WebGPUAttributes {
64
_createBuffer( attribute, usage ) {
65
66
const array = attribute.array;
67
- const size = array.byteLength + ( array.byteLength % 4 ); // ensure 4 byte alignment
+ const size = array.byteLength + ( ( 4 - ( array.byteLength % 4 ) ) % 4 ); // ensure 4 byte alignment
68
69
const buffer = this.device.createBuffer( {
70
size: size,
0 commit comments