demo · v133
WebGPU 1-comp + BGRA vertex formats
Pick a vertex format and try to build a render pipeline that consumes it. Chrome 133 adds float32 / sint32 / uint32 (1-component) and unorm8x4-bgra. Earlier Chromes reject the descriptor.
createRenderPipeline
-
webgpu available
-
checking support...
the code
const pipeline = device.createRenderPipeline({
vertex: {
module, entryPoint: "vs",
buffers: [{
arrayStride: 16,
attributes: [{ format: "unorm8x4-bgra", offset: 0, shaderLocation: 0 }], // NEW
}],
},
fragment: { module, entryPoint: "fs", targets: [{ format: "bgra8unorm" }] },
primitive: { topology: "triangle-list" },
});
see also
- WebGPU 1-comp + unorm8x4-bgra - feature index
- ChromeStatus entry
- WebGPU vertex formats