demo · v144
Struct Calculator
Type a WGSL struct in the box. The calculator lays out each field in 16-byte rows, marks padding bytes in red, and reports the total size, both under default WGSL layout and the v144 uniform_buffer_standard_layout opt-in. Useful when porting GLSL shaders or chasing a mysterious extra 16 bytes.
WebGPU: checking…
WGSL struct
field list
default WGSL layout
f32/u32/i32vec*mat*pad
standard layout (v144 opt-in)
the API
const device = await adapter.requestDevice({
requiredFeatures: ["uniform-buffer-standard-layout"] // v144 opt-in
});