Original Post
Hey, Is it possible to skip the second pass of a technique based on a bool flag? Here is a small example : I know this won't work but it displays what I'm trying to do.I could check the flag inside mySecondVertexShader and mySecondPixelShader and do nothing in the vertex shader and just use discard; in mySecondPixelShader but I want to know if there is a better alternative.
..
bool someFlag; // setable from app code
..
..
technique fooTech
{
pass P0
{
VertexShader = compile vs_2_0 myVertexShader();
PixelShader = compile ps_2_0 myPixelShader();
}
if(someFlag == true)
{
pass P1
{
VertexShader = compile vs_2_0 mySecondVertexShader();
PixelShader = compile ps_2_0 mySecondPixelShader();
}
}
}