Anonymous
public text v1 · immutablefloat r1 = (x1 > y) ? 1.0f : 0.0f;
float r2 = (x2 > y) ? 1.0f : 0.0f;
float r3 = (x3 > y) ? 1.0f : 0.0f;
float r4 = (x4 > y) ? 1.0f : 0.0f;
Would compile into 4 conditionals.
On the other hand, an HLSL step:
float4 r;
float4 x;
r = step(x, y.xxxx);
would compile to one ASM instrict.