Graphics Reference
In-Depth Information
Figure 3.75. Using a billboard to simulate more complex geometry. Model courtesy of Radioactive
Software, LLC, www.radioactive-software.com . Created by Tomas Drinovsky, Danny Green.
of rendering just the two triangles still provide a significant amount of detail. 3 6
The concept
of billboards is illustrated in Figure 3.75.
A billboard provides an increased amount of detail with very simple geometry, which
is an efficient way to introduce complexity to a scene. However, since a billboard is es-
sentially flat, when it is used in situations where it intersects other scene geometry, the
illusion of the complex geometry is spoiled, because the billboard has a uniform depth
across its surface. In this scenario, if the depth variations of the simulated geometry were
included in the billboard texture (in the alpha channel for example), the pixel shader could
write a modified depth value to the fragment, thereby reintroducing depth complexity to
the billboard geometry. Then, when scene geometry intersects the billboards, they will ac-
tually appear more convincing, with partial occlusion rather than complete occlusion. An
example of this type of depth modification is shown in Figure 3.76.
Conservative depth output. However, writing depth values from the pixel shader does
have some drawbacks. Most modern GPUs implement an efficiency improvement tech-
nique referred to as Hierarchical-Z Culling, or Hi-Z. The concept behind this technique is
for the GPU hardware to perform some simplified forms of occlusion tests to see if the cur-
rent batch of geometry will be able to be seen in the final render target, or if it would appear
behind another object in the rendering. If the geometry would be occluded, then it is simply
3 6
Billboards are used in the particle system sample discussed in Chapter 12, "Simulations."
Search WWH ::




Custom Search