What does the HW rasterizer have to do blending? Producing a launch order of threads you believe to result in a better access pattern?
-
-
Replying to @jhaberstro
My understanding is that on desktop it has some kind of internal HW queue of fragments coming from the shading units to reduce global memory traffic?
3 replies 0 retweets 0 likes -
Replying to @pcwalton @jhaberstro
I just saw your code. You're computing blending all tiles in a single thread. When you use the rasterizer, the pixel shader runs computeCoverage() in different threads, then performs the final blending stage serialized. [1/2]
1 reply 0 retweets 1 like -
If you want to beat the ROP, you need N threads to call computeCoverage() and store result into shared memory, then a barrier, then merge the results using a parallel sum algorithm and have 1 threads store the final combined value [2/2]
2 replies 0 retweets 0 likes -
Replying to @matiasgoldberg @jhaberstro
Yeah, I’ve thought about doing it that way. But other compute-based vector rendering solutions I’ve seen don’t work this way; they interpret command lists sequentially per tile.
3 replies 0 retweets 0 likes -
The problem with the parallel sum approach is that it's not the most energy-efficient. Baking Bézier curves to an intermediate representation of MSDF would be quite efficient for scaling and compositing. Color MSDF might be tricky though. Cached coverage channels?
1 reply 0 retweets 0 likes -
I’ve thought about mSDF but I don’t think it works for dynamic vector graphics (like canvas), because mSDF is too expensive to generate. I’m interested in trying a variant of mSDF combined with sparse virtual texturing and a background/foreground per cell though…
2 replies 0 retweets 1 like -
If you have the Bézier roots, and are calculating analytical coverage, then saving distances is not that much more effort and they scale almost perfectly. It needs to consider the next and prior contour at each point. I’ve not looked closely enough at Viktor’s code tho...
1 reply 0 retweets 0 likes -
msdfgen has a bunch of hacks to do geometric simplification because mSDF can only encode C1 OP C2 per texel, where OP is AND or OR. Can’t work as a general solution, it’d break too much content. (It tends to fail on fonts like Roboto Ultra Light; that’s why Android rejected it)
3 replies 0 retweets 0 likes -
It also has bugs. I ported the pure distance calculation code to run in a GLSL shader and noticed rendering glitches. I thought I had introduced bugs so traced against the C++ on a pixel by pixel basis and noticed the bugs were in the original code.
1 reply 0 retweets 0 likes
Ack. I don’t blame Viktor though, geometric simplification is hard :(
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.