I’m going to give a presentation on how to draw 2D graphics efficiently in 2018 and it’ll just be one slide: “Use the Z-buffer”
-
-
Replying to @pcwalton
This is however very context-dependent. For game UI it's rarely worth it, because almost all elements are heavy on transparency.
1 reply 0 retweets 0 likes -
Yeah, and even if not fully transparent most 2D stuff (e.g. sprites) need at least a thin soft outline to not appear pixelated, even if the inner pixels are fully opaque.
1 reply 0 retweets 1 like -
Replying to @FlohOfWoe @stoyannk
You should still Z cull the inner opaque pixels. It makes a huge difference.
1 reply 0 retweets 1 like -
Hmm a bit tricky though, because the soft outlines must still be rendered back to front... maybe 2-pass: 1st pass blend off, only opaque pixels, front-to-back with depth-write on and z-cmp less-equal. 2nd pass all pixels, blend on, back-to-front, depth-write off, z-cmp 'less'
1 reply 0 retweets 0 likes
That’s almost what Pathfinder does in its tessellation mode, yeah.
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.