I want to optimize size of vertex buffer. Currently my layout for VBO is:
x y | r g b a
It's consumed by shader like this:
struct VertexInput {
@location(0) position: vec2<f32>,
@location(1) color: vec4<f32>,
}
And I'm storing mesh in buffer like this: |Mesh1_____|Mesh2____|LargeMesh3_|, because my meshes are dynamic. It's being rendered in one drawCall.
I want to reduce sent data to GPU by setting color for every mesh, not every vertex. How can I achive it?