Shader animations


To achieve the desired amount of zombies and guts on the Oculus Quest, I once again use the power of unity's multithreaded DOTS. 
But this doesn't allow for the classic animation system. Therefore the first thing to do was to create a shader that uses vertex animations to make the zombie walk. 
Instead of using a texture or vertex colors I calculate the limbs and a gradient on them, as seen by the colors.
After that I can add a simple offset wich is animated by the sine of the ingame time and multiply that by the gradient of the limbs.
This allows for full instancing both on the CPU & GPU. So the quest doesn't have to calculate thousands of skinned meshes on to their bones.
But of course it also limits the possibilities. As a shader can only have one animation and changing the shader looks rather aprupt.
Luckily it works fine in this case because the zombies only walk and get a new shader when they are dead.
But the splash of blood and organs hides the sudden change a bit.

Leave a comment

Log in with itch.io to leave a comment.