Help with FXC error?

I googled this quite a bit and cannot find a solution for the life of me. I am working with Direct3D 11 (in the tutorials under /Sample/ - the cube one). It uses .fx, and I know it is deprecated, but there are no tutorials out there that don't use it. Pretty much, whenever I build my program, I get the error "fxc.exe exited with code 1". Here is my code in "Shader.fx":

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Constant buffer 
cbuffer ConstantBuffer : register(b0){
	matrix World;
	matrix View;
	matrix Projection;
}

struct VS_OUTPUT{
	float4 Pos : SV_POSITION;
	float4 Color : COLOR0;
};

// Vertex Shader
VS_OUTPUT VS(float4 Pos : POSITION, float4 Color : COLOR){
	VS_OUTPUT output = (VS_OUTPUT)0;
	output.Pos = mul(Pos, World);
	output.Pos = mul(output.Pos, View);
	output.Pos = mul(output.Pos, Projection);
	output.Color = Color;
	return output;
}

// Pixel Shader
float4 PS(VS_OUTPUT input) : SV_Target{
	return input.Color;
}


And under the properties of the file I have ShaderType set to "Effect(/fx)". And I don't have anything under Entrypoint name. I am using Visual Studio 2013, by the way.
Last edited on
If you're compiling shader at runtime, exclude your shader file from build. (Open properties for your shader file, and put there exclude from build yes)
Topic archived. No new replies allowed.