CS448 Programming Assignment #3 --
Intro to a Real-Time Programmable Shading System
This assignment is due at the start of class on Monday, April
Using the files in /usr/class/cs448/assignments/a3/ (on some
machines access this as /n/snell/usr/class...) as a starting
point, create a surface similar to either the marble, flame, or planet from Ken
In addition, add a colored spotlight to illuminate the bottom-right
part of the sphere, which is only dimly lit in the template program.
The colored spotlight must be implemented as a second light, which
will require that you write a light shader for it, and active that
light shader in main.cpp.
The following pre-defined variables are available in light shaders,
and may be helpful:
// Predefined light shader globals
vertex floatv S; // light-space surface vector, normalized, w=0
vertex float Sdist; // distance to surface point
Some additional comments on this assignment:
- You may use noise or environment map textures as building blocks,
but you are not allowed to just create the surface as a single
- Don't expect an exact match, just try to reproduce the character
of the images. In particular, we don't expect an exact match for
the lighting -- the diffuse and specular provided are close
enough. And we certainly we don't expect an exact match from the
noise function. The one I provided is a cheap 2D interpolated
value noise, while Ken Perlin's images were generated using a
better 3D gradient noise.
- We reiterate the statement from the last assignment: Don't invest
infinite amounts of time on this assignment.
- Use the SGI machines in the graphics research cluster for this
- When you are done, type "cs448submit hw3 directoryname",
where directoryname is the name of the directory
containing the assignment files. This script will copy the files
to our incoming-assignments directory. Note that re-submitting
overwrites the previous submission. The cs448submit script
lives in /usr/class/cs448/bin, (on some machines,
- Unless you get really fancy, your changes will probably be limited
to simpshade.in, the setup_pixel_map function in main.cpp, and the
light-setup code in main.cpp. You should turn in a printout of
these files (and any other files you created or modified) at the start
of class on April 24.