DX11 - Weird shader behavior with and without branching
- by Martin Perry
I have found problem in my shader code, which I dont´t know how to solve.
I want to rewrite this code without "ifs"
tmp = evaluate and result is 0 or 1 (nothing else)
if (tmp == 1) val = X1;
if (tmp == 0) val = X2;
I rewite it this way, but this piece of code doesn ´t word correctly
tmp = evaluate and result is 0 or 1 (nothing else)
val = tmp…