If you compute offset manually, you can reuse dX: offset=0.5*dX + window.y - left.x. This is a mad and a sub, so should save one instr. Also, can bake in the +8.0 into the LUT instead of doing in the shader.
-
-
-
Thanks! That “+ 8.0” is needed to turn a signed value into an unsigned one unfortunately. (Clamp filtering is needed, so can’t mirror.)
- 1 more reply
New conversation -
-
-
Your shader code is always very pleasing to read, especially when you’re finding a simpler, faster solution.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Pathfinder looks really nice! Currently considering msdf & pathfinder for my ui lib. The biggest downside I see currently to pf is that I would need to port quite a bit of code to C...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Not sure if this is still true, but can't those ternary operators run faster if you convert it to a sum of multiplications instead? E.g. left = winding * from + (1 - winding) * to My understanding was that branch predictions are costly on the gpu.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.