Advertisement
Shader Examples

Here is a list of links that will take you to executable demos and source code for almost all of the shaders that appear in OpenGL Shading Language. To see the code for the individual shaders that appear in the book, click on the "Shader Catalog" button in the menu to the left.

 

  Link   GLSLdemo Executable
GLSLdemo is a program that illustrates the use of many of the shaders published in the Orange Book. After you've downloaded and installed it,click "File->Open Program List" and then choose the file "OrangeBook.xml".
  Link   GLSLdemo Source Code
Source code for v3.8 of GLSLdemo
  Link   RenderMonkey Examples
Some shaders were easiest to implement and distribute as RenderMonkey files. This zip file contains a few RenderMonkey .rfx files such as cube environment mapping, image-based lighting, Ward's BRDF model, glyph bombing, and überlight.
  Link   ogl2particle
Another relatively simple source code example. This one illustrates the use of generic vertex attributes for the confetti cannon (particle system) shader described in Chapter 16.
  Link   ogl2brick
This is a simple standalone application that illustrates the use of the procedural brick shader described in Chapter 6. Start here if you want a reasonably simple and straightforward source code example.
  Link   ShaderGen Executable
ShaderGen is a program that can automatically produce shaders that mimic the results of a set of fixed function state. This tool was used to verify the fixed function shader code that is described in Chapter 9.
  Link   ShaderGen Source Code
Source code for ShaderGen v3.0
  Link   ShaderGen Source Code + Data
A big download (30Mb) that contains the ShaderGen 3.0 source code and the models that it uses
  Link   deLight Executable
This more complex application includes shaders adapted from Chapters 12-14 of the book. It includes support for reflection, refraction, ambient occlusion, and other lighting, reflection, and shadowing techniques. (Warning: 70Mb download)
  Link   deLight Source Code
Source code for deLight (Warning: 75Mb download)
  Link   Orange Book Shaders
This zip file contains the source for all of the complete shader examples that are contained in the second edition of the OpenGL Shading Language book.
 
thinkorange05.jpg