The main problem is that you end up evaluating a relatively expensive pixel shader for every pixel covered by each trapezoid, even for pixels that are far away from the edges.
-
Show this thread
-
As I see it, the cleverest thing that Pathfinder 3 does is reduce the number of times you have to do expensive edge evaluations, by partioning the screen into tiles, and doing a simple fill of tiles that are completely covered.
1 reply 0 retweets 1 likeShow this thread -
The tiled approach seems to have other advantages as well. It doesn't require you to partition the shape: you can just assign each edge to each tile in its entirety, without splitting it.
1 reply 0 retweets 1 likeShow this thread -
All in all, the more I looked into this problem, the more obvious it became to me that
@pcwalton put a lot of thought into Pathfinder 3. It's the best way I know of to do high quality antialiasing of vector graphics on low end GPUs.1 reply 0 retweets 2 likesShow this thread -
Another important aspect of PF3 is how the tiling scheme lets you reduce overdraw (quickly discard content under fully covered tiles). A lot of gfx papers don't take into account that interesting vector graphics drawings are built upon many paths stacked on top of one another
1 reply 0 retweets 0 likes -
Replying to @nicalsilva @pcwalton
Definitely. The trapezoidation approach I ended up with requires you to render each layer separately, from bottom to top order, so it's at a clear disadvantage to Pathfinder when there are many layers.
1 reply 0 retweets 0 likes -
By the way, something I've been wondering about: I suspect the tiles that pathfinder generates have to be pixel aligned in order for the math to stay simple. Assuming that's the case, does that mean you have to regenerate the tilemap even when scaling?
2 replies 0 retweets 0 likes -
Replying to @ejpbruel @nicalsilva
Yes. I plan to have a mode where I cache tiles at various mipmap/zoom levels and just interpolate between them.
1 reply 0 retweets 0 likes -
This loses some quality, but I think it’s necessary to compete with signed distance fields for text rendering in 3D. SDF is almost unbeatable otherwise.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @nicalsilva
As I understand it, SDF doesn't work for all fonts, isn't that correct? So SDF only beats Pathfinder if you don't need a generic solution to font rendering.
1 reply 0 retweets 0 likes
Correct, but a lot of games don’t care about a general solution.
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.