Graphics Reference
In-Depth Information
of g(v) in this case. For other values of w , we use a smoothstep to fade
between the true function and average values. The full definition of the
smoothstep built-in function is provided in Appendix B.
This discussion should have provided you with good insight into how
to use procedural textures and how to resolve aliasing artifacts that become
apparent when you are using procedural textures. The generation of
procedural textures for many different applications is a very broad subject.
The following list of references is a good place to start if you are interested
in finding more information about procedural texture generation.
Further Reading on Procedural Textures
1.
Anthony A. Apodaca and Larry Gritz. Advanced Renderman: Creating
CGI for Motion Pictures (Morgan Kaufmann, 1999).
2.
David S. Ebert, F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and
Steven Worley. Texturing and Modeling: A Procedural Approach , 3rd ed.
(Morgan Kaufmann, 2002).
3.
K. Perlin. An image synthesizer. Computer Graphics (SIGGRAPH 1985
Proceedings, pp. 287-296, July 1985).
4.
K. Perlin. Improving noise. Computer Graphics (SIGGRAPH 2002
Proceedings, pp. 681-682).
5.
K. Perlin. Making noise. noisemachine.com/talkl/.
6.
Pixar. The Renderman interface specification, version 3.2. July 2000.
renderman.pixar.com/products/rispec/index.htm.
7.
Randi J. Rost. OpenGL Shading Language , 2nd ed. (Addison-Wesley
Professional, 2006).
Rendering Terrain with Vertex Texture Fetch
The next topic we cover is rendering terrain with the vertex texture fetch
feature in OpenGL ES 3.0. In this example, we show how to render a
terrain using a height map, as shown in Figure 14-14.
Our terrain rendering example consists of two steps:
1.
Generate a square grid for the terrain base.
2.
Compute a vertex normal and fetch height values from the height
map in the vertex shader.
 
 
 
Search WWH ::




Custom Search