Hi, me again!
Lately I’ve been experimenting with writing custom materials using shaders written in AGAL. I used the advanced level tutorials here http://away3d.com/tutorials/ as a starting point and must say they are very helpful. I now have control over custom vertex and fragment operations and am starting to do some nice creative 3D work with Away3D.
For my next step I want to combine the control I have over the custom shaders but also add SpriteSheet animation into my custom material. I’ve followed the Basic_SpriteSheetAnimation example from the repo and understand how to create and apply the texture, create the SpriteSheetAnimator and apply it to the mesh. I’m not sure though of how to combine the 2 processes.
Do I have to implement the whole texture/spritesheet sampling into my own custom MaterialPass? Or can I override some methods of the TextureMaterial and update the getVertexCode() or getFragmentCode() that way? Or is there a totally different better way?
I wouldn’t ask but I just can’t find any more documentation on this. I’m sure with enough hours of reverse engineering I’ll figure it out but would really appreciate an answer even just a quick pointer to push me (and others that may face this request in the future) in the right direction.
Thanks