This tutorial describes in detail each aspect of the creation of a scene centered upon a dilapidated billboard somewhere in the desert southwest. We'll see how foreground and background geometry combine with sky and lighting effects to form a coherent scene in both day...

... and night.

Many of the details of the implementation are omitted from this discussion. It is assumed that any reader looking to implement the techniques presented here will already be familiar with the particulars of OpenGL application initialization, extension management, and texture and object loading. Where appropriate, links to further information are provided.
We proceed in four parts, with each part building on the previous. All of the demo screen shots and code samples included in each of these four parts are taken from the final version of the demo, provided below.
This document presents several examples of GLSL vertex and fragment shaders. We distinguish these two as follows. Vertex shader code appears in green:
void main()
{
gl_Position = ftransform();
}
Fragment shader code appears in yellow:
void main()
{
gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
}
The demo source code including all models, shaders, and textures may be downloaded here. It has been built and tested under Windows XP, OSX, and Linux. Visual Studio 7 project files and a Unix makefile are included.
Demo controls:
Rotate the view
Rotate the sky
Zoom the view
Toggle the passage of time
Toggle wireframe view
Screenshot
Flush and reload all configurations and assets
Exit
