float4 texel;
if ( input.Position.y < 50 )
{
texel = tex2D(texsampler1, input.TexCoords);
}
else
{
texel = tex2D(texsampler2, input.TexCoords);
}
return texel;
This code fails and will not compile...
If I hard code the input.position.y to a number 1, I can compile but that is useless for obvious reasons.
I've also tried to implement a situation where I didnt need an "if statement" at all by adding the two pixels together after I multiplied them by a 1 or 0 passed in from the vertex shader but again, it fails.