I'm trying to do binary operations with integers in the hlsl code. For example:
int n = 10 & 15;
Binary value of 10 = 1010 and Binary value of 15 = 1111.
With this, n = 10, because (1010 & 1111) = 1010. This is what I need, but if I declare the int values before, I get an error. For example:
int n1 = 10;
int n2 = 15;
int n = n1 & n2;
this shows the error: "error X3535: Bitwise operations not supported on legacy targets."
I made this simple code to help understanding, because I have no idea what is causing this.
I already tried to change the variables type to uint, but the error remains.
I'm using deferred lighting in xna and I want to store the emissive light intensity together with the specular power.