kikonen / learnopengl

https://learnopengl.com
1 stars 0 forks source link

anim: GPU skinning #110

Open kikonen opened 2 months ago

kikonen commented 2 months ago

Steps 1) Calculate animation & anim blending in CPU and generate bone palette matrices 2) In compute shader pre-transform all vertices for skinned meshes with bone matrices

=> Theorem is that this reduces needed calculations, especially since, every mesh need to be drawn from multiple different camera viewpoints for every frame, upto 45 times.


Trivia: When single scene is drawn, full scene is drawn basically 45 times

Thus approximately 45 times per frame. However, cheating, thus not drawing everything on every frame. But still 20+ times per frame averages

=> However, this means also that mesh vertices must be multiplied per for every animated mesh, to store pre-calculated verticies. Overhead of this is potentially eating away benefits for big meshes with thousands of vertices