amazon.com:
This is the eBook version of the printed book.
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
- Lighting with spherical harmonics
- Volume shadows using deferred lighting
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.
amazon.co.uk:
"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 GLSL?well 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
- Lighting with spherical harmonics
- Volume shadows using deferred lighting
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.
amazon.co.uk:
Randi Rost is an ISV Manager in the Software and Solutions Group at Intel. Previously he held several positions at 3Dlabs, Inc., the company that led the creation of the OpenGL Shading Language (GLSL). Randi was a core contributor to the development of GLSL and the OpenGL API that supports it, as well as one of the first programmers to design and implement shaders using this technology.
amazon.com:
OpenGL has had a great increase in interest in the last couple years. Sony announced in March that the upcoming PlayStation 3 will rely on OpenGL standards, instead of their previous proprietary standards. At SIGGRAPH in August of 2004 the OpenGL Architecture Review Board (ARB) announced the release of OpenGL 2.0. The biggest change was the inclusion of the OpenGL Shading Language (GLSL) as part of the core API. (Previously GLSL had been an extension to OpenGL.) While the basic structure of GLSL did not change, most of the naming conventions did. Randi Rost has been at the center of the development of GLSL, and its incorporation into the OpenGL core. He has updated his book with about 30% new material to address the more integrated nature of GLSL and all of the naming changes. He has added four new chapters addressing new shaders, and has completely updated the appendices. The first edition of this book quickly established itself as the definitive guide to GLSL, and has become known in the OpenGL community as "the orange book." This edition should see sales grow as GLSL becomes more widely used. And because GLSL is now part of the standard, this edition should not need to be revised for a few years, giving it a long shelf life.
Orange Book
08 Mar 2007 @ amazon.com
I definitely recommend this book for anyone working with OpenGL’s new Shading Language. I would, however, say that probably the most difficult part of working with GLSL is getting it working in the first place. Especially on Linux, this is somewhat confusing - some cards support GL 2.0, some don’t, but still support the GLSL if using the ARB function calls. I would also make sure to point out to new users that GLEW is close to essential when working with the GLSL - you can download it from sourceforge. It might be worth mentioning in future versions of the book, along with ARB functions which are the same as the GLSL standard functions shown in the book.
A little chunky, but a good necessary work
09 Mar 2006 @ amazon.com
I’m not a fan of the ’group of papers’ style of book. But this book pulls it off nicely. The text is consistenly good throughout. And the illustrations and formulas are high quality and presented nicely.
I would have liked full color throughout, but I accept that it would have been cost prohibitive on a book of this heft. Speaking of heft, yeah, this is a doorstop of a book. I think some of the text could have been edited down and the formatting tightened up to reduce bulk.
Excellent guide to OpenGL Shading Language
17 Feb 2006 @ amazon.com
The recent trend in graphics hardware has been to replace fixed functionality with programmability in areas that have grown exceedingly complex (e.g., vertex processing and fragment processing). The OpenGL Shading Language has been designed to allow application programmers to express the processing that occurs at those programmable points of the OpenGL pipeline. Independently compilable units that are written in this language are called shaders. A program is a set of shaders that are compiled and linked together. The OpenGL Shading Language is based on ANSI C and many of the features have been retained except when they conflict with performance or ease of implementation. This shading language is without a doubt the most important addition to OpenGL since its inception, and this book provides an excellent guide to programming with it. The author was one of the primary contributors to the development of the language, and he provides a well-written and insightful explanation of the language and its use.
The book begins with a review of OpenGL basics, followed by an introduction to shaders and how they fit into the pipeline. It then covers the language itself, including data types, operators, interaction with the OpenGL state machine and fixed function pipeline, built-in functions, and more. It also introduces and explains the OpenGL APIs needed to use shaders.
The last half of the book focuses on shader development, including general process and workflow, and coverage of many specific techniques, such as procedural textures and GPU-based animation. It even includes a section on implementing the fixed function pipeline using shaders. The book ends with a handy comparison of OpenGL Shading Language with other shading languages, such as Cg, HLSL, and Renderman and a couple of appendices providing a language grammar and API reference.
I particularly liked chapters 6 through 8, which take you from a simple shading example -"brick"- through the specific steps of shader development that you would need to master regardless of the API you are using. Also the chapters on procedural textures and noise and the accompanying code examples helped clear up some matters that were murky when I read "Texturing & Modeling: A Procedural Approach" by Ebert et al. In summary, I highly recommend this book to anyone interested in implementing software shading, both from the standpoint of OpenGL and from the standpoint of the design process itself. I notice that Amazon does not show the table of contents for the second edition, so I do that here:
Chapter 1. REVIEW OF OPENGL BASICS
OpenGL History; OpenGL Evolution; Execution Mode; The Frame Buffer; State; Processing Pipeline; Drawing Geometry; Drawing Images; Coordinate Transforms; Texturing;
Chapter 2. BASICS
Introduction to the OpenGL Shading Language; Why Write Shaders?; OpenGL Programmable Processors; Language Overview; System Overview; Key Benefits;
Chapter 3. LANGUAGE DEFINITION
Example Shader Pair; Data Types; Initializers and Constructors; Type Conversions; Qualifiers and Interface to a Shader; Flow Control; Operations; Preprocessor; Preprocessor Expressions; Error Handling;
Chapter 4. THE OPENGL PROGRAMMABLE PIPELINE
The Vertex Processor; The Fragment Processor; Built-in Uniform Variables; Built-in Constants; Interaction with OpenGL Fixed Functionality;
Chapter 5. BUILT-IN FUNCTIONS
Angle and Trigonometry Functions; Exponential Functions; Common Functions; Geometric Functions; Matrix Functions; Vector Relational Functions; Texture Access Functions; Fragment Processing Functions; Noise Functions;
Chapter 6. SIMPLE SHADING EXAMPLE
Brick Shader Overview; Vertex Shader; Fragment Shader; Observations;
Chapter 7 OPENGL SHADING LANGUAGE API
Obtaining Version Information; Creating Shader Objects; Compiling Shader Objects; Linking and Using Shaders; Cleaning Up; Query Functions; Specifying Vertex Attributes; Specifying Uniform Variables; Samplers; Multiple Render Targets; Development Aids; Implementation-Dependent API Values; Application Code for Brick Shaders;
Chapter 8. SHADER DEVELOPMENT
General Principles; Performance Considerations; Shader Debugging; Shader Development Tools; Scene Graphs;
Chapter 9. EMULATING OPENGL FIXED FUNCTIONALITY
Transformation; Light Sources; Material Properties and Lighting; Two-Sided Lighting; No Lighting; Fog; Texture Coordinate Generation; User Clipping; Texture Application;
Chapter 10. STORED TEXTURE SHADERS
Access to Texture Maps from a Shader; Simple Texturing Example; Multitexturing Example; Cube Mapping Example; Another Environment Mapping Example; Glyph Bombing;
Chapter 11. PROCEDURAL TEXTURE SHADERS
Regular Patterns; Toy Ball; Lattice; Bump Mapping;
Chapter 12. LIGHTING
Hemisphere Lighting; Image-Based Lighting; Lighting with Spherical Harmonics; The *erLight Shader;
Chapter 13. SHADOWS
Ambient Occlusion; Shadow Maps; Deferred Shading for Volume Shadows;
Chapter 14. SURFACE CHARACTERISTICS
Refraction; Diffraction; BRDF Models; Polynomial Texture Mapping with BRDF Data;
Chapter 15. NOISE
Noise Defined; Noise Textures; Trade-offs; A Simple Noise Shader; Turbulence; Granite; Wood;
Chapter 16. ANIMATION
On/Off; Threshold; Translation; Morphing; Other Blending Effects; Vertex Noise; Particle Systems; Wobble;
Chapter 17. ANTIALIASING PROCEDURAL TEXTURES
Sources of Aliasing; Avoiding Aliasing; Increasing Resolution; Antialiased Stripe Example; Frequency Clamping;
Chapter 18. NON-PHOTOREALISTIC SHADERS
Hatching Example; Technical Illustration Example; Mandelbrot Example;
Chapter 19. SHADERS FOR IMAGING
Geometric Image Transforms; Mathematical Mappings; Lookup Table Operations; Color Space Conversions; Image Interpolation and Extrapolation; Blend Modes;
Chapter 20. REALWORLDZ
Features; RealWorldz Internals; Implementation; Atmospheric Effects; Ocean; Clouds;
Chapter 21. LANGUAGE COMPARISON
Chronology of Shading Languages; RenderMan; OpenGL Shader (ISL); HLSL; Cg;
Appendix A. Language Grammar
Appendix B. API Function Reference
do your own shading?!
08 Feb 2006 @ amazon.com
Twenty years ago, I used to program graphics on an Evans and Sutherland PS340. It was then one of the top of the line graphics computers (costing $100k). It could labouriously do shading, but only Phong and Gouraud. Nowadays, many PCs have this ability, and much faster. But a problem still persists, where often the shading methods are restricted to what is implemented on the graphics chips.
In contrast, you have the approach in this definitive book on OpenGL Shading Language. This lets you implement in your code, shading routines of your own devising. To be sure, given the same shading method, one done in this language, and one in the hardware, then the latter will have better performance. But it turns out that today’s computers are fast enough, and have enough RAM, that the difference in response might not be appreciable.
The book describes an extensive set of built-in convenience functions that come with the language. And the language’s API is explained in detail. The author rightly recommends that you come at it with some experience in the standard OpenGL.
Since the language is still quite new, you are more or less on your own, when looking at development tools. This dearth is expected to be remedied in a few years. But right now, you’ll have to rely on your wits. Along with a chapter that gives general principles of how you should develop your own shader. What may be even more use, however, is the second half of the book. Devoted to case studies of many shaders. Understanding these may be more beneficial than any IDE.
Oh, as you might expect from a graphics book, there is a lovely set of colour plates in the middle of the book, showing what custom shaders can do. Treat it as inspiration if you wish.
A Solid Reference Book
26 Apr 2005 @ amazon.co.uk
I was surprised at how large this book was when it arrived_ bigger than the main OpenGL reference book in the same series. And the material is a little dilute - 200 pages of top quality content packed into a 600 page book.
I got slightly frustrated that it took several chapters to get into the meat of the book: before the authors got to creating useful shaders. But with hindsight, the basic material is very useful. There are gotcha’s in the shading language, and the authors do a good job of making the path as plain as possible.
Even though fewer and fewer projects I work on (I work in the games industry) use OpenGL, the shading language is probably the most important addition to the OpenGL API for years. It is a standard, and the book was designed to document that standard. Most of the last section of the book is an in depth reference which is useful to have.
I found some chapters absolutely superb. But a lot of the book’s material was wasted on me. The stuff on procedural shading is much better covered in other books. Generating a mandlebrot shader, for example, is hardly useful in a real project, in my opinion.
So I’d recommend the book to anyone who needs to understand GLSL. The bit that’s useful is very useful, and I felt it was completely worth the cover price. The rest of the book, as my wife said, is a bit of a waste of trees.
A Solid Reference Book
25 Apr 2005 @ amazon.co.uk
I was surprised at how large this book was when it arrived: bigger than the main OpenGL reference book in the same series. And the material is a little dilute - 200 pages of top quality content packed into a 600 page book.
I got slightly frustrated that it took several chapters to get into the meat of the book: before the authors got to creating useful shaders. But with hindsight, the basic material is very useful. There are gotcha’s in the shading language, and the authors do a good job of making the path as plain as possible.
Even though fewer and fewer projects I work on (I work in the games industry) use OpenGL, the shading language is probably the most important addition to the OpenGL API for years. It is a standard, and the book was designed to document that standard. Most of the last section of the book is an in depth reference which is useful to have.
I found some chapters absolutely superb. But a lot of the book’s material was wasted on me. The stuff on procedural shading is much better covered in other books. Generating a mandlebrot shader, for example, is hardly useful in a real project, in my opinion.
So I’d recommend the book to anyone who needs to understand GLSL. The bit that’s useful is very useful, and I felt it was completely worth the cover price. The rest of the book, as my wife said, is a bit of a waste of trees.
Joins the OpenGL canon
13 Apr 2005 @ amazon.com
The OpenGL Shading Language is without doubt the most important addition to OpenGL since its inception, and this book provides an excellent guide to programming with it. As one of the primary contributors to the development of the language, Rost provides a clear and well-written explanation of the language and how to use it.
The book begins with a review of OpenGL basics, followed by an introduction to shaders and how they fit into the pipeline. It then covers the language itself, including data types, operators, interaction with the OpenGL state machine and fixed function pipeline, built-in functions, and more. It also introduces and explains the OpenGL APIs needed to use shaders.
The last half of the book focuses on shader development, including general process and workflow, and coverage of many specific techniques, such as procedural textures and GPU-based animation. It even includes a section on implementing the fixed function pipeline using shaders.
The book ends with a handy comparison of GLSL with other shading languages, such as Cg and HLSL, and a couple of appendices providing a language grammar and API reference.
If you’re doing shader development with OpenGL, you’ll definitely want this book on your desk. My only complaint about it is that it was written before GLSL was officially promoted to the core. When that happened, a number of important things were changed that aren’t reflected in the book. However, determining the differences isn’t difficult, so don’t let that deter you from picking this up.