This is however very context-dependent. For game UI it's rarely worth it, because almost all elements are heavy on transparency.
-
-
-
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.
- 3 more replies
New conversation -
-
-
Sorry, but can you explain this a bit further? I know what a Z-buffer is, but why is it needed for 2D?
-
Basically vector graphics tend do be built upon many layers which means lots of overdraw and memory bandwidth. Using the z-buffer to draw opaque content front to back let's you save a ton of memory bandwidth.
- 6 more replies
New conversation -
-
-
I feel, as someone who has a background with 3D drawing but less so 2D drawing, I don't have a clear sense of how to use the Z buffer productively.
-
Separate 2D content into layers so you have Z values. (You can just assign an ID sequentially if you want.) Draw opaque content front to back with Z test and write enabled, then disable Z writes and draw transparent content back to front.
- 1 more reply
New conversation -
-
-
Can I do that on the browser <canvas/>? Is creating many translucent canvas the way to go?
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.