So I've done an experement where I can render a mesh using integers. See it and its explanation here: #showcase message
So I want to apply textures to the thing. Here I can see how the vertex buffer is supposed to output the UV:
https://github.com/bevyengine/bevy/blob/fc56c686af20f5a91aae436511a634b758d31643/crates/bevy_pbr/src/render/mesh_vertex_output.wgsl#L6
But when I try to use it, it looks to be undefined:
2022-12-02T01:03:23.750006Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: invalid field accessor `uv`
┌─ wgsl:956:9
│
956 │ out.uv = vec2(u, v);
│ ^^ invalid accessor
After digging in engine code, it appears VERTEX_UVS is undefined because I don't have an attribute for it in my mesh: https://github.com/bevyengine/bevy/blob/d44e86507f66d2cbe2472557d2a2abb9c4f80a83/crates/bevy_sprite/src/mesh2d/mesh.rs
Well yeah, all my attributes have been combined into one buffer using bitmasks.
Is it possible to define VERTEX_UVS for the shader without needing to have that vertex buffer on hand?
A refreshingly simple data-driven game engine built in Rust - bevy/mesh.rs at d44e86507f66d2cbe2472557d2a2abb9c4f80a83 · bevyengine/bevy