Hrm? I don't see us always casting. Although, arguably, we should.
Searching all the uses of `HLSL_OP3_TERNARY` in the codebase, I see that the condition is either a cast to bool or a comparison operation, which gives a bool result. I am missing a case?
add_ternary() casts the condition to bool *if* it's scalar, but not otherwise. That's kind of incidental, since the main point there was to match the shape.
But if we did always cast to bool, why would we want to reinterpret to float here?
On SM1 casts to bool are rather complicated and handled by the earlier `lower_casts_to_bool()` pass. After this pass, we know that all bool values are represented as 0.0f or 1.0f at runtime, so every time we need to cast a float to bool it should be reinterpret instead.
Sure, but if HLSL_OP3_TERNARY is allowed to take a float, then why do we need to do anything at the HLSL level? We can just translate OP3_TERNARY directly when writing sm1.