Open subsoap opened 7 years ago
This feature would be incredibly useful for sprite shaders The approach has been getting increasingly popular with the advance of tools such as https://www.kickstarter.com/projects/2dee/sprite-dlight-instant-normal-maps-for-2d-graphics https://www.youtube.com/watch?v=YMTZ_urkVjQ
related thread: https://forum.defold.com/t/deffx-a-collection-of-useful-shader-effects/8172/23
When you add images to an atlas you could add for example
What if we could add
Then be able to define the animation as
And in the sprite component be able to define the different texture sets to pass to the material like
And it would automatically pass in the right data for example for when the animation is on the first frame of animation "guy_jump"
This way the position of the different diffuse / normal / etc. maps doesn't matter, they could all share the same texture atlas but would also need to pass in the right coords for each extra texture too.