Graphics Reference
In-Depth Information
4.
Krzystof Niski, Budirijanto Purnomo, and Jonathan Cohen. Multi-
grained Level of Detail Using Hierarchical Seamless Texture Atlases (ACM
SIGGRAPH I3D, 2007).
5.
Filip Strugar. Continuous distance-dependent level of detail for
rendering heightmaps ( Journal of Graphics, GPU and Game Tools , vol. 14,
issue 4, 2009).
Shadows Using a Depth Texture
The next topic we cover is rendering shadows using a depth texture in
OpenGL ES 3.0 using a two-rendering-pass algorithm:
1.
In the first rendering pass, we draw the scene from the point
of view of the light. We record the fragment depth value into a
texture.
2.
In the second rendering pass, we render the scene from the point of
view of the eye position. In the fragment shader, we perform a depth
test that determines whether the fragment is in the shadow
by sampling the depth texture.
In addition, we use the percentage closer filtering (PCF) technique
to sample the depth texture to generate soft shadows.
The result of executing the shadow rendering example from
Chapter_14/Shadows is shown in Figure 14-15.
Figure 14-15
Shadow Rendering with a Depth Texture and 6 × 6 PCF
 
 
Search WWH ::




Custom Search