为什么编译VS时会出现error X3501: 'VS': entrypoint not found的错误呀?
我用DX9+HLSL,编译Vertex Shader时出现错误error X3501: 'VS': entrypoint not found
是什么原因呀?
代码是:
float4 matWVP;
struct VS_INPUT
{
float3 pos:POSITION;
};
struct VS_OUTPUT
{
float3 pos:POSITION;
};
VS_OUTPUT main(VS_INPUT vs_in)
{
VS_OUTPUT vs_out = (VS_OUTPUT)0;
vs_out.pos = mul(vs_in.pos, matWVP);
return vs_out;
}
[解决办法]
对啦,上面代码是错哒。下面是正确哒。
float4x4 matWVP;
struct VS_INPUT
{
float4 pos:POSITION;
};
struct VS_OUTPUT
{
float4 pos:POSITION;
};
VS_OUTPUT main(VS_INPUT vs_in)
{
VS_OUTPUT vs_out = (VS_OUTPUT)0;
vs_out.pos = mul(vs_in.pos, matWVP);
return vs_out;
}