Open topic with navigation
This sample demonstrates the pixel-level effect of enabling the conservative rasterization feature supported in OpenGL. It allows applications to shade every pixel whose area is touched by a fragment, rather than only those touching specific samples.
The OpenGL samples all share a common app framework and certain user interface elements, centered around the "Tweakbar" panel on the left side of the screen, which lets you interactively control certain variables in each sample.
To show and hide the Tweakbar, simply click or touch the triangular button positioned in the top-left of the view.
Other controls are listed below:
This simple sample demonstrates a new rasterization feature introduced in the Maxwell GM20x architecture —conservative rasterization.
Traditional rasterization considers pixels as discrete sample points, and only generates a pixel (fragment) if the sample point is inside the primitive. This means it is possible for thin and edge-on triangles to miss the samples entirely.
Conservative rasterization generates a fragment if the primitive intersects any part of the pixel area. This generally means that the outline of the primitive is expanded.
Conservative rasterization can be useful for 3D voxelization and generating data structures using rasterization on the GPU. For example, to generate a uniform grid acceleration structure, you want to know which triangles intersect each grid cell. This can be achieved by rendering the triangles at the grid resolution with conservative rasterization, and storing the triangle indices using a linked list.
Conservative rasterization also works with line and point primitives.
It is worth noting that there is limited precision available in the hardware to determine if a pixel intersects a primitive. The test is conservative, in that pixels may sometimes be identified as intersecting, even if with perfect precision they do not, but pixels will never be excluded if they do actually intersect the primitive.
Note that conservative rasterization can also be achieved on older hardware using a combination of a special geometry and pixel shader as described in the GPU Gems 2 article below, but in many cases this incurs considerable performance overhead. Hardware conservative rasterization has roughly the same performance as normal rasterization (it generates more fragments, and so might be slightly slower).
NVIDIA® GameWorks™ Documentation Rev. 1.0.180319 ©2014-2018. NVIDIA Corporation. All Rights Reserved.