Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Z-buffering
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Z-culling== In [[rendering (computer graphics)|rendering]], z-culling is early pixel elimination based on depth, a method that provides an increase in performance when rendering of hidden surfaces is costly. It is a direct consequence of z-buffering, where the depth of each pixel candidate is compared to the depth of the existing geometry behind which it might be hidden. When using a z-buffer, a pixel can be culled (discarded) as soon as its depth is known, which makes it possible to skip the entire process of lighting and [[Texture mapping|texturing]] a pixel that would not be [[Visibility (geometry)|visible]] anyway. Also, time-consuming [[pixel shader]]s will generally not be executed for the culled pixels. This makes z-culling a good optimization candidate in situations where [[fillrate]], lighting, texturing, or pixel shaders are the main [[Bottleneck (engineering)|bottlenecks]]. While z-buffering allows the geometry to be unsorted, sorting [[Polygon (computer graphics)|polygons]] by increasing depth (thus using a reverse [[painter's algorithm]]) allows each screen pixel to be rendered fewer times. This can increase performance in fillrate-limited scenes with large amounts of overdraw, but if not combined with z-buffering it suffers from severe problems such as: * polygons occluding one another in a cycle (e.g. triangle A occludes B, B occludes C, C occludes A) * the lack of any canonical "closest" point on a triangle (i.e. no matter whether one sorts triangles by their [[centroid]] or closest point or furthest point, one can always find two triangles A and B such that A is "closer" but in reality B should be drawn first). As such, a reverse painter's algorithm cannot be used as an alternative to z-culling (without strenuous re-engineering), except as an optimization to z-culling. For example, an optimization might be to keep polygons sorted according to x/y-location and z-depth to provide bounds, in an effort to quickly determine if two polygons might possibly have an occlusion interaction.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)