This week I’ve been focusing on porting the skinning to OpenCL to avoid skinning in a shader. This has worked out pretty well, as we now can animate and skin the characters without any loss of performance. However, this performance increase raises a problem…
To get the skinned vertices to the graphics card, I have to save them in a texture. And textures have limited sizes. And I need a set of skinned vertices per skin and per animation. So one might be concerned with running out of memory, for obvious reasons. The simple solution is just to make the texture bigger, and that I can, but one might not want to constantly write to an image with the dimensions 4096 x 4096 pixels every frame, it’s costly. I’m going to have to investigate how many animations I can queue before I lose the performance I gained by using OpenCL.
Also, together with Simon I’ve now implemented skinned characters with LOD. This was fairly simple, as I only have to treat all levels of LOD as a single skin, and just simply pick what level of LOD I want to use, in the GLSL shader.