That's where you define the format of vertices.
And the input to pixel shader.
Code:
struct TVertex {
float4 Position : POSITION;
float2 TexCoord0 : TEXCOORD0;
};
struct TPixel {
float4 Position : POSITION;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
float4 TexCoord2 : TEXCOORD2;
};
And here you send input in the format that you have defined.
Code:
void VS(in TVertex Input, out TPixel Output)
{
...
}
That is all in .fx file so all you need to do is make sure you arrange your vertex buffers in the format that the vertex shader would understand.
Shaders normally dont give any errors, so if the input data is missing it may either be replaced with "rubish" or zeros.
Bookmarks