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
Rasterisation
(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!
=== Triangle rasterization === [[File:Top-left triangle rasterization rule.gif|thumb|right|Rasterizing triangles using the top-left rule]] [[Polygon mesh|Polygons]] are a common representation of digital 3D models. Before rasterization, individual polygons are typically broken down into triangles; therefore, a typical problem to solve in 3D rasterization is rasterization of a triangle. Properties that are usually required from triangle rasterization algorithms are that rasterizing two adjacent triangles (i.e. those that share an edge) # leaves no holes (non-rasterized pixels) between the triangles, so that the rasterized area is completely filled (just as the surface of adjacent triangles). And # no pixel is rasterized more than once, i.e. the rasterized triangles don't overlap. This is to guarantee that the result doesn't depend on the order in which the triangles are rasterized. Overdrawing pixels can also mean wasting computing power on pixels that would be overwritten. This leads to establishing '''rasterization rules''' to guarantee the above conditions. One set of such rules is called a '''top-left rule''', which states that a pixel is rasterized if and only if # its center lies completely inside the triangle. Or # its center lies exactly on the triangle edge (or multiple edges in case of corners) that is (or, in case of corners, all are) either ''top'' or ''left'' edge. A ''top'' edge is an edge that is exactly horizontal and lies above other edges, and a ''left'' edge is a non-horizontal edge that is on the left side of the triangle. This rule is implemented e.g. by [[Direct3D]]<ref>{{cite web |title=Rasterization Rules (Direct3D 9) |url=https://docs.microsoft.com/en-us/windows/win32/direct3d9/rasterization-rules |website=Microsoft Docs |access-date=19 April 2020}}</ref> and many [[OpenGL]] implementations (even though the specification doesn't define it and only requires a consistent rule<ref>{{cite book |title=OpenGL 4.6 |page=478 |url=https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf}}</ref>).
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)