I'm trying to use multiple techniques in my fx file. I've written two different techniques one just for Ambient light and the other one is for all other light types. Vertex Shader is the same for bith techniques but pixel shader is different.
technique TexAmbientTech
{
pass T0
{
vertexShader = compile vs_3_0 TexLightVS();
pixelShader = compile ps_3_0 TexAmbientPS();
}
}
technique TexLightTech
{
pass P0
{
vertexShader = compile vs_3_0 TexLightVS();
pixelShader = compile ps_3_0 TexLightPS();
}
}
Now the problem is no matter which technique do i specify the program uses only that technique that occours first. Suppose if i want to use TexLight Techinique and do
effect->SetTechnique("TexLight");
still TexAmbient is being used.
I cant figure out the problem. Can anyone please tell me what am i doing wrong?
Regards