CMSC 491G/691G: Real-Time Shading

Assignment 2

Simple Real-Time Shader

Due March 3, 2005

Goal

The primary purpose of this assignment is for you to select a platform (i.e. Windows, Mac, Linux), API (OpenGL or DirectX), language (glslang, HLSL, Cg or libsh), and compiler (built into API, NVIDIA Cg compiler, ATI ASHLI, libsh), and possibly a run-time toolkit to use for the remainder of the course. The machine you plan on using for primary development should have a reasonably recent GPU; say NVIDIA GeForce FX or ATI 9600 or later. These each support at least limited vertex and fragment/pixel shading programs. If you do not have an appropriate GPU (and don't want to use this class as a convenient excuse to buy one), we do have some appropriate machines in the VANGOGH lab. See me if you do not already have lab access.

The Assignment

First, you will need to make all of the choices listed above. Consider which machine, operating system, and development environment you already have or have used for other projects. A significant part of this assignment will be downloading tools and getting them to work. This can sometimes be a long and frustrating process, so be sure to leave sufficient time.

Once you have the basic tools working, create shaders for the two-pass pseudo-subsurface scattering skin described by Mitchell and Sander in the 2004 Real-Time Shading SIGGRAPH course notes. The first pass should use a vertex shader to unwrap the object into texture space and a pixel/fragment shader to compute the per-pixel lighting. The results of this pass should be stored in a texture for use in the second pass. You may optionally use one or more passes to blur the texture (or do that through mutiple accesses in the final pass). The final pass should use several accesses to the lighting texture to create the simulated skin. You may use any object with a simple one-to-one mapping to texture space. A teapot wouldn't work too well because each patch has its own texture coordinates, so would overlap when unwrapped. However, a torus or sphere would be OK. Your results will look more interesting if you find a model with some geometric detail (like a head or person).

Helpful code

What (and how) to turn in what you do

Make sure your final version is checked in to your Assn2 CVS directory by 11:59 PM on the day of the deadline. Include a readme.txt telling me about your assignment: What platform, etc. did you choose? What (if any) help did you receive from books, web sites or people? If you used template code for application or shaders, what changes did you make? What do your shaders do? You should also check in a screenshot of your final results. Finally, you should include everything I'd need to render your project if I were using the same platform, OS and compiler you have chosen. Do not all of the intermediate .o's, executables, or other generated files (other than your screen shot).