Transparency
Is about rendering objects that are not fully opaque.
Problems rendering transparent objects #
-
Opaque objects all have to be rendered before the transparent objects
-
There is not one depth that corresponds to a pixel
-
The render order matters
How it is done #
- Use Alpha Blending
- Transparent objects should not write into the depth buffer
- First all non-transparent objects should be rendered with the normal depth buffer
- Then transparent objects should be ordered either back to front or front to back without modifying the depth buffer
Implementations #
- Sort objects by depth and use Alpha Blending
- Per-Pixel Linked Lists
- Depth Peeling