Skip to content

hafewa/UnityFishAnimation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityFishAnimation

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.

result result

How To Use

resultresult

  • 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.

Credits

This project was inspired by Abzu Creator's GDC Video

Resources

Sardine asset & Whale asset

About

A vertex shader for fish animation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published