Original Post
Hi I am using directX 9.c and I am trying to use a very simple if-else statement inside a vertex shader. the shader compiler i am using is 3. here is the code: if(...) { OUT.worldPosition.a = 0; } else if(...) { OUT.worldPosition.a = 1; } else if(...) { OUT.worldPosition.a = 2; } . . . when i read the output texture of the shader, i get some interpolated values of "a" (e.g. 1.02, 1.56 etc) although i set "a" in the shader to 0 or 1 or 2 and so on... I read that branching is an issue in previous shader compliers but i am already using version 3... any one has any idea why its messing things up? Thanks