I created a shader that seems to work nicely in the VS2012 shader designer. It saves it in DGSL format, which I then exported to HLSL.
I thought I'd be able to use this in an XNA project, but there are two things that are very new to me and I'm hoping someone can point me in the right direction:
1) Every shader I've seen so far had a section like this
technique RibbonShader
{
pass Pass0
{
VertexShader = compile vs_2_0 VertexShader();
PixelShader = compile ps_2_0 PixelShader();
}
}
Unfortunately the HLSL generated by the VS2012 export feature has only a main function, like so:
P2F main(V2P pixel)
{
// lots of stuff
return result;
}
Can someone gently explain what I need to do to get my shader (the one with the 'main' function) that works so well in the designer to be in a format that has the technique/pass format like above?