Mismatch between input assembler and vertex shader - but it looks right

余生颓废 提交于 2019-12-13 05:26:32

问题


I had a similar issue someone kindly solved here, but that led me to this one. The error is:

"Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. The input stage requires Semantic/Index (SV_POSITION,0) as input, but it is not provided by the output stage."

Here is my declaration and the vertex shader input. Can anyone tell me why they wouldn't match? I'm stumped.

static const D3D11_INPUT_ELEMENT_DESC vertexLayout[] =
{
    { "SV_POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0,  0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
    { "COLOR",       0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0 },
};

...and the shader input:

struct VertexShaderInput
{
    float4 Position             : SV_POSITION;
    float4 Color                : COLOR;
};

来源:https://stackoverflow.com/questions/31256255/mismatch-between-input-assembler-and-vertex-shader-but-it-looks-right

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!