hi,
after implementing skinning with compute shader i want to implement skinning with VertexShader Streamout method to compare performance.
The following Thread is a discussion about it.
Here's the recommended setup:
- Use a pass-through geometry shader (point->point), setup the streamout and set topology to point list.
- Draw the whole buffer with context->Draw(). This gives a 1:1 mapping of the vertices.
- Later bind the stream out buffer as vertex buffer. Bind the index buffer of the original mesh.
- draw with DrawIndexed like you would with the original mesh (or whatever draw call you had).
I know the reason why a point list as input is used, because when using the normal vertex topology as input the output would be a stream of "each of his own" primitives that would blow up the vertexbuffer. I assume a indexbuffer then would be needless ?
But how can you transform position and normal in one step when feeding the pseudo Vertex/Geometry Shader with a point list ?
In my VertexShader i first calculate the resulting transform matrix from bone indexes(4) und weights (4) and transform position and normal with the same resulting transform Matrix.
Do i have to run 2 passes ? One for transforming position and one for transforming normal ?
I think it could be done better ?
thanks for any help