Muutke küpsiste eelistusi

E-raamat: Graphics Shaders: Theory and Practice, Second Edition 2nd edition [Taylor & Francis e-raamat]

(Brown Cunningham Associates, Coralville, Iowa, USA), (Oregon State University, Corvallis, USA)
  • Formaat: 520 pages
  • Ilmumisaeg: 08-Nov-2011
  • Kirjastus: A K Peters
  • ISBN-13: 9780429104701
  • Taylor & Francis e-raamat
  • Hind: 138,48 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 197,84 €
  • Säästad 30%
  • Formaat: 520 pages
  • Ilmumisaeg: 08-Nov-2011
  • Kirjastus: A K Peters
  • ISBN-13: 9780429104701
Graphics Shaders: Theory and Practice is intended for a second course in computer graphics at the undergraduate or graduate level, introducing shader programming in general, but focusing on the GLSL shading language. While teaching how to write programmable shaders, the authors also teach and reinforce the fundamentals of computer graphics. The second edition has been updated to incorporate changes in the OpenGL API (OpenGL 4.x and GLSL 4.x0) and also has a chapter on the new tessellation shaders, including many practical examples.

The book starts with a quick review of the graphics pipeline, emphasizing features that are rarely taught in introductory courses, but are immediately exposed in shader work. It then covers shader-specific theory for vertex, tessellation, geometry, and fragment shaders using the GLSL 4.x0 shading language. The text also introduces the freely available glman tool that enables you to develop, test, and tune shaders separately from the applications that will use them. The authors explore how shaders can be used to support a wide variety of applications and present examples of shaders in 3D geometry, scientific visualization, geometry morphing, algorithmic art, and more.

Features of the Second Edition:











Written using the most recent specification releases (OpenGL 4.x and GLSL 4.x0) including code examples brought up-to-date with the current standard of the GLSL language. More examples and more exercises A chapter on tessellation shaders An expanded Serious Fun chapter with examples that illustrate using shaders to produce fun effects A discussion of how to handle the major changes occurring in the OpenGL standard, and some C++ classes to help you manage that transition

The authors thoroughly explain the concepts, use sample code to describe details of the concepts, and then challenge you to extend the examples. They provide sample source code for many of the books examples at www.cgeducation.org
Foreword xix
Preface xxiii
1 The Fixed-Function Graphics Pipeline
1(24)
The Traditional View
2(6)
The Vertex Operation
2(4)
The Fragment Processing Part of the Pipeline
6(1)
State in the Graphics Pipeline
7(1)
How the Traditional View Is Implemented
8(9)
Vertex Processing
9(1)
Rendering Processing
10(4)
Homogeneous Coordinates in the Fixed-Function Pipeline
14(3)
Vertex Arrays
17(3)
Conclusions
20(1)
Exercises
21(4)
2 OpenGL Shader Evolution
25(14)
History of Shaders
27(3)
OpenGL Shader History
30(4)
OpenGL 2.0/GLSL 1.10
30(1)
OpenGL 3.x/GLSL 3.30
31(1)
OpenGL 4.0/GLSL 4.00
32(1)
OpenGL 4.x/GLSL 4.x0
33(1)
What's Behind These Developments?
34(1)
OpenGL ES
34(1)
How Can You Respond to These Changes?
35(1)
Our Approach in this Book
36(1)
Variable Name Convention
36(1)
Exercises
37(2)
3 Fundamental Shader Concepts
39(30)
Shaders in the Graphics Pipeline
39(15)
Vertex Shaders
42(5)
Fragment Shaders
47(3)
Tessellation Shaders
50(3)
Geometry Shaders
53(1)
The GLSL Shading Language
54(5)
Passing Data from Your Application into Shaders
59(8)
Defining Attribute Variables in Your Application
59(3)
Defining Uniform Variables in Your Application
62(2)
A Convenient Way to Transition to the Newer Versions of GLSL
64(3)
Exercises
67(2)
4 Using glman
69(22)
Using glman
71(1)
Loading a GLIB File
72(1)
Editing GLIB and Shader Source Files
72(1)
GLIB Scene Creation
72(10)
Window and Viewing
73(1)
Transformations
73(1)
Defining Geometry
73(3)
Specifying Textures
76(1)
Specifying Shaders
77(1)
Miscellaneous
78(1)
Specifying Uniform Variables
79(2)
Examples of GLIB Files
81(1)
More on Textures and Noise
82(4)
Using Textures
82(2)
Using Noise
84(2)
Functions in the glman Interface Window
86(4)
Generating and Displaying a Hardcopy of Your Scene
86(1)
Global Scene Transformation
86(1)
Eye Transformation
87(1)
Object Picking and Transformation
87(1)
Texture Transformation
88(1)
Monitoring the Frame Rate
88(1)
Miscellaneous
89(1)
Exercises
90(1)
5 The GLSL Shader Language
91(32)
Factors that Shape Shader Languages
92(3)
Graphics Card Capabilities
93(2)
General GLSL Language Concepts
95(3)
Shared Namespace
95(1)
Extended Function and Operator Capabilities
96(1)
New Functions
97(1)
New Variable Types
97(1)
New Function Parameter Types
98(1)
Language Details
98(16)
Omitted Language Features
98(1)
New Matrix and Vector Types
99(1)
Name Sets
100(1)
Vector Constructors
101(1)
Functions Extended to Matrices and Vectors
102(3)
Operations Extended to Matrices and Vectors
105(1)
New Functions
106(6)
Swizzle
112(1)
New Function Parameter Types
112(1)
Const
113(1)
Compatibility Mode
114(6)
Defining Compatibility Mode
114(1)
OpenGL 2.1 Built-in Data Types
114(6)
Summary
120(1)
Exercises
120(3)
6 Lighting
123(16)
The ADS Lighting Model
124(3)
The ADS Lighting Model Function
125(2)
Types of Lights
127(4)
Positional Lights
128(1)
Directional Lights
128(1)
Spot Lights
129(2)
Setting Up Lighting for Shading
131(6)
Flat Shading
132(1)
Smooth (Gouraud) Shading
133(1)
Phong Shading
134(1)
Anisotropic Shading
135(2)
Exercises
137(2)
7 Vertex Shaders
139(18)
Vertex Shaders in the Graphics Pipeline
140(6)
Input to Vertex Shaders
140(2)
Output from Vertex Shaders
142(3)
Fixed-Function Processing After the Vertex Shader
145(1)
The Relation of Vertex Shaders to Tessellation Shaders
146(1)
The Relation of Vertex Shaders to Geometry Shaders
146(1)
Replacing Fixed-Function Graphics with Vertex Shaders
146(2)
Standard Vertex Processing
147(1)
Going Beyond the Fixed-Function Pipeline with Vertex Shaders
148(1)
Vertex Modification
148(4)
Issues in Vertex Shaders
151(1)
Creating Normals
152(1)
Summary
153(1)
Exercises
154(3)
8 Fragment Shaders and Surface Appearance
157(22)
Basic Function of a Fragment Shader
158(5)
Inputs to Fragment Shaders
158(3)
Particularly Important "In" Variables for the Fragment Shader
161(1)
Coordinate Systems
162(1)
Fragment Shader Processing
163(1)
Outputs from Fragment Shaders
163(1)
Replacing Fixed-Function Processing with Fragment Shaders
163(5)
Shading
164(1)
Traditional Texture Mapping
165(1)
False Coloring
166(2)
What Follows a Fragment Shader?
168(1)
Additional Shader Effects
169(8)
Discarding Pixels
169(1)
Phong Shading
169(1)
Shading with Analytic Normals
170(2)
Anisotropic Shading
172(1)
Data-Driven Coloring
173(2)
Images Using Other Data
175(2)
Exercises
177(2)
9 Surface Textures in the Fragment Shader
179(34)
Texture Coordinates
180(1)
Traditional Texture Mapping
180(2)
GLSL Texture Mapping
182(23)
The Texture Context
184(1)
Texture Environments in the Fixed-Function World
185(1)
Texture Sampling Parameters
186(1)
Samplers
186(1)
Procedural Textures
187(6)
Bump Mapping
193(7)
Cube Maps
200(5)
Render to Texture
205(4)
Render to Texture for Multipass Rendering in glman
209(3)
Exercises
212(1)
10 Noise
213(26)
Fundamental Noise Concepts
214(6)
Three Types of Noise: Value, Gradient, and Value+Gradient
214(1)
Cubic and Quintic Interpolation
215(1)
Noise Equations
216(4)
Other Noise Concepts
220(8)
Fractional Brownian Motion (FBM, 1/f, Octaves)
220(1)
Noise in Two and Three Dimensions
221(2)
Using Noise with glman
223(2)
Using Noise with the Built-In GLSL Functions
225(1)
Turbulence
225(3)
Some Examples of Noise in Different Environments
228(7)
Marble Shader
230(1)
Cloud Shader
231(2)
Wood Shader
233(2)
Advanced Noise Topics
235(1)
Using Noisegraph
235(2)
Exercises
237(2)
11 Image Manipulation with Shaders
239(52)
Basic Concepts
240(1)
Single-Image Manipulation
241(29)
Luminance
241(2)
CMYK Conversions
243(3)
Hue Shifting
246(2)
Image Filtering
248(1)
Image Blurring
249(2)
Chromakey Images
251(1)
Stereo Anaglyphs
252(4)
3D TV
256(3)
Edge Detection
259(1)
Embossing
260(2)
Toon Shader
262(2)
Artistic Effects
264(1)
Image Flipping, Rotation, and Warping
265(5)
The Image Blending Process
270(1)
Blending an Image with a Constant Base Image
271(4)
Color Negative
272(1)
Brightness
273(1)
Contrast
274(1)
Blending an Image with a Version of Itself
275(2)
Saturation
275(1)
Sharpness
276(1)
Blending Two Different Images
277(9)
Other Combinations
278(3)
Image Transitions
281(5)
Notes
286(1)
Exercises
287(4)
12 Geometry Shader Concepts and Examples
291(24)
What Does the Geometry Shader Do?
292(9)
New Adjacency Primitives
294(1)
Layouts for Input and Output Variables
295(1)
New OpenGL API Functions
296(3)
New GLSL Variables and Variable Types
299(1)
Communication between a Vertex or Tessellation Shader and a Geometry Shader
299(2)
Normals in Geometry Shaders
301(1)
Examples
301(11)
Bezier Curves
301(2)
Shrinking Triangles
303(2)
Sphere Subdivision
305(4)
3D Object Silhouettes
309(3)
Exercises
312(3)
13 Tessellation Shaders
315(38)
What Are Tessellation Shaders?
315(3)
Tessellation Shaders or Geometry Shaders?
317(1)
Tessellation Shader Concepts
318(5)
Issues in Setting Tessellation Levels
323(1)
Examples
323(27)
Isolines
324(3)
Bezier Surface
327(7)
Sphere Subdivision
334(7)
Whole Sphere Subdivision while Adapting to Screen Coverage
341(3)
PN Triangles
344(6)
Summary
350(1)
Exercises
351(2)
14 The GLSL API
353(22)
Shaders in the OpenGL Programming Process
353(2)
Handling OpenGL Extensions
355(1)
How Is a GLSL Shader Program Created?
355(2)
Creating and Compiling Shader Objects
357(3)
The CheckGLErrors Function
359(1)
Creating, Attaching, Linking, and Activating Shader Programs
360(4)
Creating a Shader Program and Attaching Shader Objects
361(1)
Linking Shader Programs
361(1)
Activating a Shader Program
362(2)
Passing Data into Shaders
364(8)
Defining Uniform Variables in Your Application
364(3)
Uniform Variables in Compatibility Mode
367(1)
Defining Attribute Variables in Your Application
368(2)
Attribute Variables in Compatibility Mode
370(1)
A C++ Class to Handle Shader Program Creation
371(1)
Exercises
372(3)
15 Using Shaders for Scientific Visualization
375(50)
Image-Based Visualization Techniques
376(2)
Image Negative
376(1)
Image Edge Detection
377(1)
Toon Rendering
377(1)
Hyperbolic Geometry
378(3)
3D Scalar Data Visualization
381(17)
Point Clouds
383(4)
Cutting Planes
387(3)
Volume Probe
390(2)
Direct Volume Rendering
392(6)
More on Transfer Functions
398(5)
Passing in Data Values with Your Geometry
403(2)
Terrain Bump-Mapping
405(3)
Flow Visualization
408(8)
2D Line Integral Convolution
408(3)
3D Line Integral Convolution
411(2)
Extruding Objects for Streamlines
413(3)
Geometry Visualization
416(4)
Silhouettes
416(1)
Hedgehog Plots
417(3)
Exercises
420(5)
16 Serious Fun
425(40)
Light Interference
426(7)
Diffraction Gratings
427(4)
Oil Slicks
431(2)
Lens Effects
433(5)
Bathroom Glass
438(2)
Atmospheric Effects
440(8)
Rainbows
441(4)
The Glory
445(3)
Fun with One
448(1)
Using the glman Timer Function
449(1)
Disco Ball
449(3)
Fog, with and without Noise
452(1)
Morphing 3D Geometry
453(3)
Algorithmic Art
456(3)
Connett Circles
456(3)
Making Information Visible Through Motion
459(2)
An Explosion Shader
461(1)
Exercises
462(3)
Appendices
A GLSLProgram C++ Class
465(4)
B Matrix4 C++ Class
469(4)
C Vec3 C++ Class
473(4)
D Vertex Array Class
477(6)
References 483(4)
Index 487
Mike Bailey is a professor of computer science at Oregon State University. Dr. Bailey is a member of ACM, SIGGRAPH, IEEE, ASME. He earned a Ph.D. in computer graphics and computer aided design from Purdue University. His areas of interest include scientific visualization, high performance computer graphics, GPU programming, solid freeform fabrication, geometric modeling, and computer aided design and analysis.

Steve Cunningham is a professor emeritus of computer science at California State University Stanislaus. A member of ACM SIGGRAPH, ACM SIGCSE, and Eurographics, he has been actively engaged in computer graphics education for many years.