Add vertex attribute validation to Material
trait
#6128
Labels
A-Rendering
Drawing game state to the screen
C-Feature
A new feature, making something new possible
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
Mesh attributes required by a material are not validated when using a material with a mesh.
What solution would you like?
Extend the Material trait with something similar to
fn required_mesh_attributes() -> Option<Vec<MeshVertexAttribute>>
.The default behaviour would return
None
and not validate anything. Otherwise, the validation would check that each attributes is present on the mesh and ignore other attributes since passing more attributes should be allowed.What alternative(s) have you considered?
N/A
Additional context
Proposed in #6127 by @devil-ira
The text was updated successfully, but these errors were encountered: