Graphics Shaders: Theory and Practice

Chapter 10 Source Code


This page was last updated: September 14, 2009


ExampleGLIB fileVertex fileFragment fileGeometry fileComments
3D TV 3dtv.glib 3dtv.vert 3dtv.frag   One of the proposals for 3D TV format
Red-Cyan Stereo anaglyph.glib anaglyph.vert anaglyph.frag    
Many Image Methods image.glib image.vert image.frag   Requires: castle.bmp, kec.back.left.bmp, and kec.back.right.bmp
Contains Negative, Brightness, Contrast, Saturation, Difference, Dissolve, Sharpness, Edge detection, Chromakey, and Embossing all in the same file (uses an #ifdef).
Toon Rendering toon.glib toon.vert toon.frag   Requires: castle.bmp

3dtv and anaglyph also need some left-right stereo pairs. You can take your own, or here are some of ours to start:

ImageLeftRight
Back of Kelley Engineering Center kec.back.left.bmp kec.back.right.bmp
NASA Mars images mars_left.bmp mars_right.bmp
Snowy Woods woods.left.bmp woods.right.bmp