Update to SABR v3.0.
joshuass says:
Been busy working on a way to remove the final bits of branching
(assuming the built in step function isn't a branch itself).
I removed the branching by calculating a set of booleans for each
interpolation result at the four corners in a way that only allows
a corner to have one of its interpolation values be true.
Then, by casting, I can multiply and sum all the interpolation
amounts and rules in a single pass rather than using the if/else and
ternary statements.
Finally, to get rid of the final artifacts due to using all corners
to determine a texel's color, I am calculating the values twice. One
time by going counter clockwise, and one time going clockwise. Then
I select the value that is the furthest from the texel's original
value through a step/mix function combination.
It works incredibly well! I just hope that it also makes it
speedier.