Graphics Reference
In-Depth Information
Pixel
Ownership
Test
Fragment
Data
Scissor
Test
To
Framebuffer
Stencil
Test
Depth
Test
Blending
Dithering
Figure 1-5
OpenGL ES 3.0 Per-Fragment Operations
During the per-fragment operations stage, the following functions (and
tests) are performed on each fragment, as shown in Figure 1-5:
• Pixel ownership test—This test determines whether the pixel at
location ( x w , y w ) in the framebuffer is currently owned by OpenGL
ES. This test allows the window system to control which pixels in the
framebuffer belong to the current OpenGL ES context. For example,
if a window displaying the OpenGL ES framebuffer window is
obscured by another window, the windowing system may determine
that the obscured pixels are not owned by the OpenGL ES context
and, therefore, the pixels might not be displayed at all. While the
pixel ownership test is part of OpenGL ES, it is not controlled by the
developer, but rather takes place internally inside of OpenGL ES.
• Scissor test—The scissor test determines whether ( x w , y w ) lies within
the scissor rectangle defined as part of the OpenGL ES state. If the
fragment is outside the scissor region, the fragment is discarded.
• Stencil and depth tests—These tests are performed on the stencil and
depth value of the incoming fragment to determine whether the
fragment should be rejected.
• Blending—Blending combines the newly generated fragment color value
with the color values stored in the framebuffer at location ( x w , y w ).
• Dithering—Dithering can be used to minimize the artifacts that occur as
a result of using limited precision to store color values in the framebuffer.
At the end of the per-fragment stage, either the fragment is rejected or
a fragment color(s), depth, or stencil value is written to the framebuffer
at location ( x w , y w ). Writing of the fragment color(s), depth, and stencil
values depends on whether the appropriate write masks are enabled.
Write masks allow finer control over the color, depth, and stencil values
written into the associated buffers. For example, the write mask for the
 
 
Search WWH ::




Custom Search