A vertex shader for fish animation
Right now, the light model is a simple toon shading and mesh color(you can replace it with main texture of course). In my project, I use toon shading and mesh color to dynamic batching as many mesh as possible. since I usually got a lot of fish on the scene.
-
Create new material with -> Custom/ToonMovingFish shader.
-
Toggle on the
DEBUG_COLOR_MASK
option in the material inspector. -
Adjust
_InvertScale
for each model (usually a small model will require larger invertScale) -
Adjust
_MaskZ
to mask out the vertex animation strength. The animation strength will scale with the debug color on the mesh.(scale from black(0) to white(1)). -
Toogle on different animation option like SpinRoll, Side to side movement...etc
-
Make sure the frequence are all the same for more nature movement.
This project was inspired by Abzu Creator's GDC Video