OpenGL R Shading Language 2nd Edition by Randi J Rost,John M Kessenich , Barthold Lichtenbelt – Ebook PDF Instant Download/Delivery:0321334892, 978-0321334893
Full download OpenGL R Shading Language 2nd Edition after payment

Product details:
ISBN 10: 0321334892
ISBN 13: 978-0321334893
Author: Randi J Rost,John M Kessenich , Barthold Lichtenbelt
“As the ‘Red Book’ is known to be the gold standard for OpenGL, the ‘Orange Book’ is considered to be the gold standard for the OpenGL Shading Language. With Randi’s extensive knowledge of OpenGL and GLSL, you can be assured you will be learning from a graphics industry veteran. Within the pages of the second edition you can find topics from beginning shader development to advanced topics such as the spherical harmonic lighting model and more.”
David Tommeraasen, CEO/Programmer, Plasma Software
“This will be the definitive guide for OpenGL shaders; no other book goes into this detail. Rost has done an excellent job at setting the stage for shader development, what the purpose is, how to do it, and how it all fits together. The book includes great examples and details, and good additional coverage of 2.0 changes!”
Jeffery Galinovsky, Director of Emerging Market Platform Development, Intel Corporation
“The coverage in this new edition of the book is pitched just right to help many new shader-writers get started, but with enough deep information for the ‘old hands.'”
Marc Olano, Assistant Professor, University of Maryland
“This is a really great book on GLSLwell written and organized, very accessible, and with good real-world examples and sample code. The topics flow naturally and easily, explanatory code fragments are inserted in very logical places to illustrate concepts, and all in all, this book makes an excellent tutorial as well as a reference.”
John Carey, Chief Technology Officer, C.O.R.E. Feature Animation
OpenGL® Shading Language, Second Edition, extensively updated for OpenGL 2.0, is the experienced application programmer’s guide to writing shaders. Part reference, part tutorial, this book thoroughly explains the shift from fixed-functionality graphics hardware to the new era of programmable graphics hardware and the additions to the OpenGL API that support this programmability. With OpenGL and shaders written in the OpenGL Shading Language, applications can perform better, achieving stunning graphics effects by using the capabilities of both the visual processing unit and the central processing unit.
In this book, you will find a detailed introduction to the OpenGL Shading Language (GLSL) and the new OpenGL function calls that support it. The text begins by describing the syntax and semantics of this high-level programming language. Once this foundation has been established, the book explores the creation and manipulation of shaders using new OpenGL function calls.
OpenGL® Shading Language, Second Edition, includes updated descriptions for the language and all the GLSL entry points added to OpenGL 2.0; new chapters that discuss lighting, shadows, and surface characteristics; and an under-the-hood look at the implementation of RealWorldz, the most ambitious GLSL application to date. The second edition also features 18 extensive new examples of shaders and their underlying algorithms, including
- Image-based lighting
- Lighting with spherical harmonics
- Ambient occlusion
- Shadow mapping
- Volume shadows using deferred lighting
- Ward’s BRDF model
The color plate section illustrates the power and sophistication of the OpenGL Shading Language. The API Function Reference at the end of the book is an excellent guide to the API entry points that support the OpenGL Shading Language. Also included is a convenient Quick Reference Card to GLSL.
Table of contents:
Copyright
Dedication
Praise for OpenGL® Shading Language, Second Edition
Praise for the First Edition of OpenGL® Shading Language
Foreword
Foreword to the First Edition
Preface
Intended Audience
About This Book
About the Shader Examples
Errata
Typographical Conventions
About the Author
About the Contributors
Acknowledgments
1. Review of OpenGL Basics
1.1. OpenGL History
1.2. OpenGL Evolution
1.3. Execution Model
1.4. The Frame Buffer
1.5. State
1.6. Processing Pipeline
1.7. Drawing Geometry
1.7.1. Geometry Specification
1.7.2. Per-Vertex Operations
1.7.3. Primitive Assembly
1.7.4. Primitive Processing
1.7.5. Rasterization
1.7.6. Fragment Processing
1.7.7. Per-Fragment Operations
1.7.8. Frame Buffer Operations
1.8. Drawing Images
1.8.1. Pixel Unpacking
1.8.2. Pixel Transfer
1.8.3. Rasterization and Back-End Processing
1.8.4. Read Control
1.9. Coordinate Transforms
1.10. Texturing
1.11. Summary
1.12. Further Information
2. Basics
2.1. Introduction to the OpenGL Shading Language
2.2. Why Write Shaders?
2.3. OpenGL Programmable Processors
2.3.1. Vertex Processor
2.3.2. Fragment Processor
2.4. Language Overview
2.4.1. Language Design Considerations
2.4.2. C Basis
2.4.3. Additions to C
2.4.4. Additions from C++
2.4.5. C Features Not Supported
2.4.6. Other Differences
2.5. System Overview
2.5.1. Driver Model
2.5.2. OpenGL Shading Language Compiler/Linker
2.5.3. OpenGL Shading Language API
2.6. Key Benefits
2.7. Summary
2.8. Further Information
3. Language Definition
3.1. Example Shader Pair
3.2. Data Types
3.2.1. Scalars
3.2.2. Vectors
3.2.3. Matrices
3.2.4. Samplers
3.2.5. Structures
3.2.6. Arrays
3.2.7. Void
3.2.8. Declarations and Scope
3.2.9. Type Matching and Promotion
3.3. Initializers and Constructors
3.4. Type Conversions
3.5. Qualifiers and Interface to a Shader
3.5.1. Attribute Qualifiers
3.5.2. Uniform Qualifiers
3.5.3. Varying Qualifiers
3.5.4. Constant Qualifiers
3.5.5. Absent Qualifier
3.6. Flow Control
3.6.1. Functions
3.6.2. Calling Conventions
3.6.3. Built-in Functions
3.7. Operations
3.7.1. Indexing
3.7.2. Swizzling
3.7.3. Component-wise Operation
3.8. Preprocessor
3.9. Preprocessor Expressions
3.10. Error Handling
3.11. Summary
3.12. Further Information
4. The OpenGL Programmable Pipeline
4.1. The Vertex Processor
4.1.1. Vertex Attributes
4.1.2. Uniform Variables
4.1.3. Special Output Variables
4.1.4. Built-in Varying Variables
4.1.5. User-Defined Varying Variables
4.2. The Fragment Processor
4.2.1. Varying Variables
4.2.2. Uniform Variables
4.2.3. Special Input Variables
4.2.4. Special Output Variables
4.3. Built-in Uniform Variables
4.4. Built-in Constants
4.5. Interaction with OpenGL Fixed Functionality
4.5.1. Two-Sided Color Mode
4.5.2. Point Size Mode
4.5.3. Clipping
4.5.4. Raster Position
4.5.5. Position Invariance
4.5.6. Texturing
4.6. Summary
4.7. Further Information
5. Built-in Functions
5.1. Angle and Trigonometry Functions
5.2. Exponential Functions
5.3. Common Functions
5.4. Geometric Functions
5.5. Matrix Functions
5.6. Vector Relational Functions
5.7. Texture Access Functions
5.8. Fragment Processing Functions
5.9. Noise Functions
5.10. Summary
5.11. Further Information
6. Simple Shading Example
6.1. Brick Shader Overview
6.2. Vertex Shader
6.3. Fragment Shader
6.4. Observations
6.5. Summary
6.6. Further Information
7. OpenGL Shading Language API
7.1. Obtaining Version Information
7.2. Creating Shader Objects
7.3. Compiling Shader Objects
7.4. Linking and Using Shaders
7.5. Cleaning Up
7.6. Query Functions
7.7. Specifying Vertex Attributes
7.8. Specifying Uniform Variables
7.9. Samplers
7.10. Multiple Render Targets
7.11. Development Aids
7.12. Implementation-Dependent API Values
7.13. Application Code for Brick Shaders
7.14. Summary
7.15. Further Information
8. Shader Development
8.1. General Principles
8.1.1. Understand the Problem
8.1.2. Add Complexity Progressively
8.1.3. Test and Iterate
8.1.4. Strive for Simplicity
8.1.5. Exploit Modularity
8.2. Performance Considerations
8.2.1. Consider Computational Frequency
8.2.2. Analyze Your Algorithm
8.2.3. Use the Built-in Functions
8.2.4. Use Vectors
8.2.5. Use Textures to Encode Complex Functions
8.2.6. Review the Information Logs
8.3. Shader Debugging
8.3.1. Use the Vertex Shader Output
8.3.2. Use the Fragment Shader Output
8.3.3. Use Simple Geometry
8.4. Shader Development Tools
8.4.1. RenderMonkey
8.4.2. OpenGL Shading Language Compiler Front End
8.5. Scene Graphs
8.6. Summary
8.7. Further Information
9. Emulating OpenGL Fixed Functionality
9.1. Transformation
9.2. Light Sources
9.2.1. Directional Lights
9.2.2. Point Lights
9.2.3. Spotlights
9.3. Material Properties and Lighting
9.4. Two-Sided Lighting
9.5. No Lighting
9.6. Fog
9.7. Texture Coordinate Generation
9.8. User Clipping
9.9. Texture Application
9.10. Summary
9.11. Further Information
10. Stored Texture Shaders
10.1. Access to Texture Maps from a Shader
10.2. Simple Texturing Example
10.2.1. Application Setup
10.2.2. Vertex Shader
10.2.3. Fragment Shader
10.3. Multitexturing Example
10.3.1. Application Setup
10.3.2. Vertex Shader
10.3.3. Fragment Shader
10.4. Cube Mapping Example
10.4.1. Application Setup
10.4.2. Vertex Shader
10.4.3. Fragment Shader
10.5. Another Environment Mapping Example
10.5.1. Vertex Shader
10.5.2. Fragment Shader
10.6. Glyph Bombing
10.6.1. Application Setup
10.6.2. Vertex Shader
10.6.3. Fragment Shader
10.7. Summary
10.8. Further Information
11. Procedural Texture Shaders
11.1. Regular Patterns
11.1.1. Stripes Vertex Shader
11.1.2. Stripes Fragment Shader
11.2. Toy Ball
11.2.1. Application Setup
11.2.2. Vertex Shader
11.2.3. Fragment Shader
11.3. Lattice
11.4. Bump Mapping
11.4.1. Application Setup
11.4.2. Vertex Shader
11.4.3. Fragment Shader
11.4.4. Normal Maps
11.5. Summary
11.6. Further Information
12. Lighting
12.1. Hemisphere Lighting
12.2. Image-Based Lighting
12.3. Lighting with Spherical Harmonics
12.4. The ÜberLight Shader
12.4.1. ÜberLight Controls
12.4.2. Vertex Shader
12.4.3. Fragment Shader
12.5. Summary
12.6. Further Information
13. Shadows
13.1. Ambient Occlusion
13.2. Shadow Maps
13.2.1. Application Setup
13.2.2. Vertex Shader
13.2.3. Fragment Shader
13.3. Deferred Shading for Volume Shadows
13.3.1. Shaders for First Pass
13.3.2. Shaders for Second Pass
13.4. Summary
13.5. Further Information
14. Surface Characteristics
14.1. Refraction
14.2. Diffraction
14.3. BRDF Models
14.4. Polynomial Texture Mapping with BRDF Data
14.4.1. Application Setup
14.4.2. Vertex Shader
14.4.3. Fragment Shader
14.5. Summary
14.6. Further Information
15. Noise
15.1. Noise Defined
15.1.1. 2D Noise
15.1.2. Higher Dimensions of Noise
15.1.3. Using Noise in OpenGL Shaders
15.2. Noise Textures
15.3. Trade-offs
15.4. A Simple Noise Shader
15.4.1. Application Setup
15.4.2. Vertex Shader
15.4.3. Fragment Shader
15.5. Turbulence
15.5.1. Sun Surface Shader
15.5.2. Marble
15.6. Granite
15.7. Wood
15.7.1. Application Setup
15.7.2. Fragment Shader
15.8. Summary
15.9. Further Information
16. Animation
16.1. On/Off
16.2. Threshold
16.3. Translation
16.4. Morphing
16.4.1. Sphere Morph Vertex Shader
16.5. Other Blending Effects
16.6. Vertex Noise
16.7. Particle Systems
16.7.1. Application Setup
16.7.2. Confetti Cannon Vertex Shader
16.7.3. Further Enhancements
16.8. Wobble
16.9. Summary
16.10. Further Information
17. Antialiasing Procedural Textures
17.1. Sources of Aliasing
17.2. Avoiding Aliasing
17.3. Increasing Resolution
17.4. Antialiased Stripe Example
17.4.1. Generating Stripes
17.4.2. Analytic Prefiltering
17.4.3. Adaptive Analytic Prefiltering
17.4.4. Analytic Integration
17.4.5. Antialiased Brick Fragment Shader
17.5. Frequency Clamping
17.5.1. Antialiased Checkerboard Fragment Shader
17.6. Summary
17.7. Further Information
18. Non-Photorealistic Shaders
18.1. Hatching Example
18.1.1. Application Setup
18.1.2. Vertex Shader
18.1.3. Generating Hatching Strokes
18.1.4. Obtaining Uniform Line Density
18.1.5. Simulating Lighting
18.1.6. Adding Character
18.1.7. Hatching Fragment Shader
18.2. Technical Illustration Example
18.2.1. Application Setup
18.2.2. Vertex Shader
18.2.3. Fragment Shader
18.3. Mandelbrot Example
18.3.1. About the Mandelbrot Set
18.3.2. Vertex Shader
18.3.3. Fragment Shader
18.3.4. Julia Sets
18.4. Summary
18.5. Further Information
19. Shaders for Imaging
19.1. Geometric Image Transforms
19.2. Mathematical Mappings
19.3. Lookup Table Operations
19.4. Color Space Conversions
19.5. Image Interpolation and Extrapolation
19.5.1. Brightness
19.5.2. Contrast
19.5.3. Saturation
19.5.4. Sharpness
19.6. Blend Modes
19.6.1. Normal
19.6.2. Average
19.6.3. Dissolve
19.6.4. Behind
19.6.5. Clear
19.6.6. Darken
19.6.7. Lighten
19.6.8. Multiply
19.6.9. Screen
19.6.10. Color Burn
19.6.11. Color Dodge
19.6.12. Overlay
19.6.13. Soft Light
19.6.14. Hard Light
19.6.15. Add
19.6.16. Subtract
19.6.17. Difference
19.6.18. Inverse Difference
19.6.19. Exclusion
19.6.20. Opacity
19.7. Convolution
19.7.1. Smoothing
19.7.2. Edge Detection
19.7.3. Sharpening
19.8. Summary
19.9. Further Information
20. RealWorldz
20.1. Features
20.2. RealWorldz Internals
20.2.1. Terrain-Rendering Structure
20.2.2. Shading
20.2.3. Fractal Terrains
20.2.4. Fractal Terrains in RealWorldz
20.2.5. Noise Texture Creation
20.2.6. Tile Set Noise
20.2.7. Surface Normals
20.2.8. Overhanging Terrain
20.3. Implementation
20.3.1. Noise Values and Derivatives
20.3.2. Tile Sets
20.3.3. The Function Tree
20.3.4. Terrain Color
20.3.5. AltGrad Map for Snow
20.3.6. AltGrad Map for AlienRockArt
20.3.7. AltGrad Map for DragonRidges
20.3.8. Lighting
20.3.9. Performance Considerations
20.4. Atmospheric Effects
20.4.1. Aerial Perspective
20.4.2. Sky Shading
20.5. Ocean
20.5.1. Reflections
20.5.2. Reflected Sky
20.5.3. Rendering the Ocean
20.6. Clouds
20.7. Summary
20.8. Further Information
21. Language Comparison
21.1. Chronology of Shading Languages
21.2. RenderMan
21.3. OpenGL Shader (ISL)
21.4. HLSL
21.5. Cg
21.6. Summary
21.7. Further Information
A. Language Grammar
B. API Function Reference
Implementation-Dependent API Values for GLSL
Other Queriable Values for GLSL
glAttachShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glBindAttribLocation
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glCompileShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glCreateProgram
Name
C Specification
Description
Notes
Errors
Associated Gets
See Also
glCreateShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glDeleteProgram
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glDeleteShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glDetachShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glDrawBuffers
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glEnableVertexAttribArray
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetActiveAttrib
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetActiveUniform
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetAttachedShaders
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetAttribLocation
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetProgram
Name
C Specification
Parameters
Description
Notes
Errors
ASSOCIATED GETS
See Also
glGetProgramInfoLog
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetShaderInfoLog
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetShaderSource
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetUniform
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetUniformLocation
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetVertexAttrib
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glGetVertexAttribPointer
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glIsProgram
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glIsShader
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glLinkProgram
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glShaderSource
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glUniform
Name
C Specification
Parameters
C Specification
Parameters
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glUseProgram
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glValidateProgram
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glVertexAttrib
Name
C Specification
Parameters
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
glVertexAttribPointer
Name
C Specification
Parameters
Description
Notes
Errors
Associated Gets
See Also
OpenGL 1.5 to OpenGL 2.0 GLSL Migration Guide
Afterword
Glossary
Further Reading
Color Plate
People also search for:
opengl shading language specification
opengl 2d shader
shading language pdf
gl shader language
Tags: Randi J Rost, John M Kessenich, Barthold Lichtenbelt, OpenGL R Shading, Language 2nd


