This example is running in WebGL2 and should work in most browsers. You can check the WebGPU examples here.
//! A shader that reads a mesh's custom vertex attribute. use ; // A "high" random id should be used for custom attributes to ensure consistent sorting and avoid collisions with other attributes. // See the MeshVertexAttribute docs for more info. const ATTRIBUTE_BLEND_COLOR: MeshVertexAttribute = new; /// set up a simple 3D scene // This is the struct that will be passed to your shader