Original Post
Hi, I'm trying to port my engine to the new MDX 2.0 and all my shaders compile without errors with MDX 1.1 but I can't figure out how to compile the shaders with the new Shader.FromFile() function in MDX 2.0 This new function does not accept the shader version and I think that the version is supposed to be inside the shader... I don't know how to set it in order to compile without errors. I'm not using effects, I use stand alone shaders. This is an example of shader, and it gives me the following error when compiling: error X2000: syntax error : unexpected token 'float4x4'.
vs_2_0;
float4x4 view_proj_matrix;
struct VS_INPUT
{
float4 Pos: POSITION;
float2 Tex0: TEXCOORD0;
float3 Normal: NORMAL;
float3 Tangent: TANGENT0;
float3 Binormal: BINORMAL0;
};
struct VS_OUTPUT
{
float4 Pos: POSITION;
float2 Tex0: TEXCOORD0;
};
VS_OUTPUT Main(VS_INPUT In)
{
VS_OUTPUT Out;
Out.Pos = mul(view_proj_matrix, In.Pos);
Out.Tex0 = In.Tex0;
return Out;
}