CS594
Objectives
- To provide hands-on experience with shader programming to efficiently
leverage the processing power of GPU.
- To understand the fundamentals of OpenGL pipeline, specifically
vertex and fragment processors.
- To expand the functionality of your renderer, and systematically
design modular, efficient and re-usable code.
Description
This lab assignment plays a "set-up" kind of role, similar to how lab1 helped you to learn about
OpenGL fixed functionality pipeline.
In this assignment, you are required to program using shaders and generate some simple
effects on primarily some simple planar (flat) shapes.
- Phong shading, with each fragment getting an interpolated normal and the actually
illumination equations computed on each fragment.
- A bump map on the surface. Specifically, go download some images with simple logos from
the web. For instance, you can try one with "VOLS" or "VOTE". Use any photo editing program
to convert it to grey-scale and save in a single-channel image format that you know how to
read. This image is the bump-map. In your fragment shader, just do direct reference into the
bump-map, compute its derivative in x and y directions, cross product of the two derivatives
and offset the per-fragment normal accordingly. Then compute the illumination.
Note: The Phong shading step is required. The bump-map part is not. If you can come up with
an idea that the TA and I both think is reasonable, you can implement your own idea in lieu
of bump mapping.
You can also access the slides covered in class at:
http://www.cs.utk.edu/~huangj/CS594F08/glsl.ppt.
Due Date
Tuesday, November 11, 2008.
Extra Credits
Please send the TA your ideas about generating any kind of cool graphics effects. If approved,
we can offer up to 100% extra credit for Lab 3. Since Lab 3 is already worth almost as much as the midterm exam, this offer is very substantial.
Platform
Hydra lab has 30 dual 3.4GHz P4 workstations, each with 2GB of main memory. The graphics cards on all hydra machines are:
- hydra1-10: nVidia GeForce 8800 GT 512 MB
- hydra11-16: nVidia GeForce 6800 GT 256 MB
- hydra17-20: nVidia Quadro FX 1400 128 MB
- hydra21-26: nVidia GeForce 6800 GT 256 MB
- hydra27-30: nVidia Quadro FX 1400 128 MB
All these machines are capable of OpenGL shader programming. Feel free to try glxinfo and lspci on your machine.