If you’ve received the error message “input parameter ‘xxxx’ missing semantics” in a shader the cause of the error is a missing piece of information on one of your parameters or structures. Here is an example of a shader that will produce that error.
struct VSIn {
float3 position;
float4 color;
};
struct PS_IN
{
float3 position:SV_POSITION;
float4 color:COLOR;
};
PS_IN main(VSIn input)
{
PS_IN output;
output.position = input.position;
output.color = input.color;
return output;
}
Here the correction would be to add the semantics POSITION and COLOR to the shader. The corrected shader looks like the following.
struct VSIn {
float3 position:POSITION;
float4 color:COLOR;
};
struct PS_IN
{
float3 position:SV_POSITION;
float4 color:COLOR;
};
PS_IN main(VSIn input)
{
PS_IN output;
output.position = input.position;
output.color = input.color;
return output;
}