If you do this, then you must be sure that vectors a and b is normalized. Depending on how many asset queries will be needed that may be too expensive.
And this will make asset creating a bit more difficult. Because, let's say you want hero asset that faces 45 degree direction. That is in "middle" of 0 and 1. But in your case it is not 0.5. It is 0.7071 = cos(pi/4). For angle variant what is used in stream it is easy - middle of 0 and pi/2 is pi/4.
Also to avoid branches do this:
| result = sign(b.y) * (1 + dot(a,b))
|
This assuming sign returns only -1 or +1, but never 0.