I am trying to compile a vertex shader using VS2013, but every time I try, FXC returns the following error:
Error error X3501: ‘main’: entrypoint not found
I’ve reduced the vertex shader to its simplest form and yet I’m still getting the same result:
DefaultVS.hlsl
#include "Include.hlsl"
cbuffer CameraTransform {
float4x4 ViewProjMat;
};
VS_OUT main(VS_IN input) {
VS_OUT result;
result.Position = mul(input.Position, mul(input.WorldMat, ViewProjMat));
return result;
}
Include.hlsl
struct VS_IN {
float4 Position : POSITION;
float4x4 WorldMat : INSTANCE_TRANSFORM;
};
struct VS_OUT {
float4 Position : SV_POSITION;
};
And the properties of both files:
/Zi /E”main” /Od /Fo”PathToOutputDefaultVS.cso” /vs”_5_0″ /nologo
/Zi /Od /Fo”PathToOutputInclude.cso” /nologo