Open zaycev opened 1 year ago
Example of a plugin where this would be useful for shading different types of objects (sprites): https://github.com/zaycev/bevy-magic-light-2d
Merge with https://github.com/bevyengine/bevy/issues/1738 ?
+1,atlas-animation with shader should work right out of the box.
What problem does this solve or what need does it fill?
An easy way to add a custom shader to the current 2d sprite pipeline.
What solution would you like?
As of 0.9.x, as far as I know, there is no easy way to use Material2D with sprites. From the user's point of view, it would be great if you can add a Material2D component to a sprite and have a built-in function to sample sprite texture or textures (like diffuse, normals, displacement, etc) by id inside of a shader.
What alternative(s) have you considered?
The current workaround is to split an atlas into multiple textures and bind them into Material2D components as textures rather than sprites.