I’ve been looking for optimizations for my game where a large number of enemies will be on the screen at the same time, from my tests the biggest performance throttle ends up being the animation skeleton of the enemies.
I ended up finding out about VATS and got interested in the subject but I am not experienced enough in shaders to figure out how to implement a practical pipeline:
Have a blender file containing the mesh and the animations
Bake each animation into a texture with normals and offsets (i found out a way of doing this process in blender using a very old plugin which works only for blender 2)
Import the assets to godot(meshes + images with normal and offset)
Apply those in a VAT shader
I’ve found this tutorial:
But was unable to use it in Godot 4, the issue was reported but not concluded.
It’s because the .exr VAT position image is being compressed, use Lossless or VRAM Uncompressed and it should work.
You can probably keep Generate Mipmaps on, while I don’t see an issue in the editor, mipmaps usually do bad things to VAT type textures, so check that off if you see any more issues.
One more thing, removing the .exr alpha channel will reduce the cost by 25%, and it looks like it’s the same deal with the normals texture too. The shader at least in this project, doesn’t use the channels.
That won’t work sadly, you will destroy the data unless you can find some format that can convert the 32bit exr to something lower, or look to any other photo editor like GIMP or Photopea, etc to see if there is a plugin for that.
Try opening the exr in the photo app you are using and see if you see something like I see in photoshop:
and choose as Alpha Channel, then you can delete it and resave (that is what I did to test).