Helper functions to do standard vertex shader, does instancing, skinning, etc.
This would eventually be moved to a Vertex
or inside PixelInput
class that would be more malleable.
ProcessVertex( VertexInput i )
FinalizeVertex( PixelInput o )
You're expected to commonly use these on start and end of the Vertex Block, and have any modifications of it in between them
VS
{
#include "common/vertex.hlsl"
//
// Main
//
PixelInput MainVs( VertexInput i)
{
PixelInput o = ProcessVertex(i);
// Add your vertex manipulation functions here
return FinalizeVertex(o);
}
}