Hi Guys,
I am trying my hand at HLSL for the first time in DirectX 11.
I have attempted to write a shader that just colors the quad that I have created (with a view to expanding it to display a texture later on).
But, I am not getting anything displayed on the screen. I know the quad is there, as it displays color ok with a different shader (and slight modification to my code).
Here is the buggy shader (go easy on me, I am just learning )
struct VOut
{
float4 position : POSITION;
float4 color : COLOR;
float2 tex0 : TEXCOORD0;
};
VOut VShader(float4 pos : POSITION, float4 col : COLOR, float2 tex : TEXCOORD0)
{
VOut output;
output.position = pos;
output.color = col;
output.tex0 = tex;
return output;
}
float4 PShader(float4 pos : SV_POSITION, float4 col : COLOR, float2 tex : TEXCOORD0) : SV_TARGET
{
return col;
}
I am using debug mode and also error checking all of my function calls. So, I know the shader compiles ok, but my understanding isn't good enough yet to know where I am going wrong.
Any help would be awesome