static char* shaderCode[] =
{
"float4x4 viewProjMatrix;",
"struct VS_OUT",
"{",
" float4 pos : POSITION0;",
"};",
"VS_OUT vs_main(float4 pos : POSITION)",
"{",
" VS_OUT pOut = (VS_OUT)0",
" pOut.pos = mul(viewProjMatrix,pos);",
" return pOut;",
"};",
"float4 ps_main() : COLOR",
"{",
" return float4(1,0,0,1);",
"}",
"technique One",
"{",
"pass one",
"{",
"VertexShader = compile vs_2_0 vs_main();",
"PixelShader = compile ps_2_0 ps_main();",
"}",
"}"
};
does anyone see anything wrong with this shader code? because when I ran it it complained of a syntax error but it looks fine to me.
(I'm progmmatically creating the shader).
"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack