D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (World,0) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (World,1) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (World,2) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (World,3) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that Semantic 'Texcoord' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that Semantic 'Texcoord' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that Semantic 'Color' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that Semantic 'Color' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ] D3D10: ERROR: ID3D10Device::DrawIndexed: Vertex Shader - Geometry Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (UVSize,0) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. The reason is that the input stage requires Semantic/Index (NORMAL,0) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND ] D3D10: ERROR: ID3D10Device::DrawIndexed: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. The reason is that Semantic 'TEXCOORD' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ] D3D10: ERROR: : The declared input primitive type in the current Geometry Shader does not match the current input topology. [ EXECUTION ERROR #360: DEVICE_DRAW_GS_INPUT_PRIMITIVE_MISMATCH ]
It's weird because they all seem to mention Geometry Shaders while I'm not using any.
Here are two Shaders I wrote:
//RASTERIZER
RasterizerState DisableCulling { CullMode = NONE; };
//GLOBALS
//Matrix vars
float4x4 m_MatWVP : WORLDVIEWPROJECTION;
float4x4 m_MatW : WORLD;
float4x4 m_MatViewInv : VIEWINVERSE;
//Lighting vars
float3 m_LightDirection:DIRECTION
<
string UIName = "Light Direction";
string Object = "TargetLight";
> = float3(0.577f, 0.577f, -0.577f);
//Texture vars
Texture2D m_TexDiff
<
string UIName = "Texture Diffuse";
string UIWidget = "Texture";
>;
SamplerState m_Sampler
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = WRAP;
AddressV = WRAP;
AddressW = WRAP;
};
//STRUCTS
//VSInput
struct VSInput{
float3 pos: POSITION;
float3 norm: NORMAL;
float2 tex: TEXCOORD;
float3 tangent: TANGENT;
};
//PSInput
struct PSInput{
float4 pos: SV_POSITION; //system value
float3 norm: NORMAL;
float3 worldPos: COLOR0;
float2 tex: TEXCOORD0;
};
//------------------------------------------------------------------------------------------------------
//VERTEX SHADER
PSInput MainVS(VSInput input) {
PSInput output = (PSInput)0;
output.pos = mul(float4(input.pos.xyz, 1.0), m_MatWVP);
output.worldPos = mul(float4(input.pos.xyz, 1.0), m_MatW).xyz;
output.norm = mul(input.norm, (float3x3)m_MatW);
output.tex = input.tex;
return output;
}
//PIXEL SHADER
float4 MainPS(PSInput input) : SV_TARGET {
float3 lightDir = normalize(m_LightDirection);
float3 viewDir = normalize(input.worldPos.xyz - m_MatViewInv[3].xyz);
float3 normal = normalize(-input.norm);
//calc diffuse
float diffLambert = dot(lightDir, normal);
diffLambert = max(diffLambert, 0);
//calc spec
float3 reflLightDir = reflect(lightDir, normal);
float specPhong = dot(-viewDir, reflLightDir);
specPhong = max(specPhong, 0);
specPhong = pow(specPhong, 25);
//calc finalColor
float4 col = m_TexDiff.Sample(m_Sampler, input.tex);
col *= diffLambert;
col += specPhong;
return col;
}
//------------------------------------------------------------------------------------------------------
//DX10 TECHNIQUES
technique10 DefaultTechniqueDX10 {
pass p0 {
SetRasterizerState(DisableCulling);
SetVertexShader(CompileShader(vs_4_0, MainVS()));
SetPixelShader(CompileShader(ps_4_0, MainPS()));
}
}
//RASTERIZER
RasterizerState DisableCulling { CullMode = NONE; };
//BLENDSTATE
BlendState AlphaBlend
{
BlendEnable[0] = TRUE;
SrcBlend = SRC_ALPHA;
DestBlend = INV_SRC_ALPHA;
BlendOp = ADD;
SrcBlendAlpha = ZERO;
DestBlendAlpha = ZERO;
BlendOpAlpha = ADD;
RenderTargetWriteMask[0] = 0x0F;
};
//GLOBALS
//Matrix vars
float4x4 m_MatrixWorldViewProj : WORLDVIEWPROJECTION;
float4x4 m_MatrixWorld : WORLD;
float4x4 m_MatrixViewInv : VIEWINVERSE;
//LightDirection
float3 m_LightDirection : DIRECTION<
string UIName = "Light Direction";
string Object = "TargetLight";
> = float3(-.577f,-.577f,.577f);
//Dynamic Stuff
float m_Time : TIME;
//Lighting
int m_Shininess <
string UIName = "Shininess";
string UIWidget = "Slider";
int UIMin = 0;
int UIMax = 100;
> = 2;
//Sampler
SamplerState m_SamplerTexture
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};
//Textures
Texture2D m_TextureDiffuse <
string UIName = "Texture Diffuse";
>;
//STRUCTS
//VSInput
struct VSInput{
float3 pos: POSITION;
float3 normal: NORMAL;
float2 tex: TEXCOORD;
float3 tangent : TANGENT;
};
//PSInput
struct PSInput{
float4 pos: SV_POSITION; //system value
float3 normal: NORMAL;
float2 tex: TEXCOORD0;
float3 worldPos: TEXCOORD1;
};
//------------------------------------------------------------------------------------------------------
//VERTEX SHADER
PSInput MainVS(VSInput input) {
PSInput output = (PSInput)0;
output.pos = mul(float4(input.pos.xyz, 1.0), m_MatrixWorldViewProj);
output.normal = normalize(mul(input.normal, (float3x3)m_MatrixWorld));
output.tex = input.tex;
output.worldPos = mul(input.pos, m_MatrixWorld);
return output;
}
//PIXEL SHADER
float4 MainPS(PSInput input) : SV_TARGET {
//normals
float3 n = -input.normal;
float3 lightdir = normalize(m_LightDirection);
//diffuse
float Dstren = dot(n, lightdir);
Dstren = max(Dstren, 0);
//specular (phong)
float3 viewDir = normalize(input.worldPos - m_MatrixViewInv[3].xyz);
float3 lightdirRefl = reflect(lightdir, n);
float Sstren = dot(-viewDir, lightdirRefl);
Sstren = max(Sstren, 0);
Sstren = pow(Sstren, m_Shininess);
//diffuse color
float time = m_Time - (int)m_Time;
float2 texCoord = (input.tex + time);
float4 diffColor = m_TextureDiffuse.Sample(m_SamplerTexture, texCoord);
//final color
float4 finalCol = float4(0.0f,0.0f,0.0f,1.0f);
finalCol.rgb += Dstren * diffColor.xyz;
finalCol.rgb += Sstren * float3(1.0f,1.0f,1.0f);
finalCol.a *= 0.33f + (0.5f + (sin(m_Time*10))/2.0f)/3.0f;
return finalCol;
}
//------------------------------------------------------------------------------------------------------
//DX10 TECHNIQUES
technique10 DefaultTechniqueDX10 {
pass p0 {
SetRasterizerState(DisableCulling);
SetVertexShader(CompileShader(vs_4_0, MainVS()));
SetPixelShader(CompileShader(ps_4_0, MainPS()));
SetBlendState(AlphaBlend, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xffffffff);
}
}
Can anyone see problems or does the problem lay outside of the shader code?












