Hi, i'm a complete rendering noob and am getting started with shaders.
Let's say I have a custom material like:
#[derive(AsBindGroup, TypeUuid, Clone)]
#[uuid = "1a70d46f-b455-437d-a50b-ce3a21a803f5"]
pub struct SegmentMaterial {
// main color of the segment
#[uniform(0)]
color: Color,
}
Which I add to my Res<'w, Assets<SegmentMaterial>>, resource.
- Can i share this material across multiple entities (via a MaterialMesh2dBundle) but still have a different color for each entity?
(i.e. I only have a bunch of strong handles to the same underlying asset)
Or do i have to create different 'SegmentMaterial' structs because my entities will have different colors?
Or phrased differently, it's not possible to update the color of a given MaterialMesh2DBundle, similar to what Sprites allow? Which would mean that this is less performant than using sprites