GPU Skinning - Custom Skin shader

Hi,

I am looking at implementing a shader for doing dual quaternion skinning, to try to get rid as much as possible of this old candy wrapper effect. To my knowledge, I could not find any option to use DQ in Unity, so I decided to go and code my own using matrix palette skinning…

My main problem at the moment is that vertices that are sent to the vertex shader are actually already transformed by the bone transformation. I’ve tested multiplying the vertex position in the vertex shader by the VP matrix and the vertices are already transformed by the bone rotations, but not by the model’s global position/orientation though…

I was wondering if anyone had an idea of how to get the untransformed vertex positions in the vertex shader?

Cheers,

Ludovic

(btw I do have GPU skinning enables in Unity)

AFAIK for now it is impossible to do any skinning replacement in unity.
For DX11 (and next-gen consoles ??) (when GPU skinning is enabled) Unity5 makes use of stream-out feature to process one vertex buffer into another and do skining (this is done once before frame is rendered).
For all other platforms skinning is done on the CPU (in software, on multiple threads).

So for now I see no way to override this and do won skinning … sadly

I’ve had limited success in writing my own custom skinned mesh renderer and binding bone data as additional streams: Unity - Scripting API: MeshRenderer.additionalVertexStreams

I’ve no idea how well this scales since it was for very specific procedural tech which only used 16 “bones”.