jalberse / feriphys

Physics simulations for computer graphics, in Rust
GNU General Public License v3.0
2 stars 0 forks source link

Add colors to particles CPU implementation #27

Open jalberse opened 2 years ago

jalberse commented 2 years ago

WE should color our particles. This would require adding color data to the instance data.

jalberse commented 2 years ago

This is also just, generally useful by allowing us to draw colored instances of any mesh.We might use that for flocking, e.g. (though I think I actually want to use textured models for the boids there).

jalberse commented 2 years ago

I think that we might just want a different Instance and InstanceRaw struct, for this new instance data that holds a color. So we have one instance type for our colored meshes (so we can draw them with any solid color) and one instance type (the one we currently have) for textured data.

Generally, I want some kind of system for rendering either plain forms/quads, vs ones with textures. Maintaining different render pipelines etc for them is a bit annoying, so is there some useful abstraction to unify them? Typed enum?