MP3: Shaders in OpenGL

Assigned: Saturday, March 21, 2008

Due: Monday, April 13, 11:59pm, 2008


In this project, you'll be implementing a simple shader program based on GLSL. After completing this project, you should have learned: We will use OpenGL Shading Language (GLSL) for our shader programming. A Start Kit with basic shader setup and a minimal shader program is given here. Before you start building the Start Kit, you should download and install OpenGL Extension Wrangler Library (GLEW) to use any GLSL related APIs. Note that you don't need to turn in this GLEW library unless you use other libraries for accessing GL Extension. Since GLSL is OpenGL standard, it should have good compatibility across different hardware/platform. However, we recommend you trying out the Start Kit earlier in case of any compatibility issues. If your graphics card doesn't support OpenGL 2.0, you can use XP machines at Computer lab in 0216 SC which have compatible graphics card for OpenGL 2.0. 

Sample Models

To help you in preparing this project, we are providing you with a selection of sample mesh models. Most of them are identical models from MP2, and you are free to use your own models.


Requirements

[10 points] Mesh Display

[10 points] Vertex Transformation Animation

[30 points] Per-pixel Phong Shading

[40 points] Tangent Space Normal Mapping
Implement tagent space normal mapping as discussed in the lecture on 3/17. For meshes with both texture coordinates and a normal map image, you can use the Ogre model provided in this MP. You are free to use your own dataset, but their normal map needs to be encoded in tangent spaces instead of the object space.

[10 points] Code Design and Documentation
Your code should be well designed and well written. It should be easy to follow the logic of your program. A readme file should explain the features and special instructions ( if any ) to run your code.

Tips and hints

Handing in your Project

Important: Follow all handin instructions carefully. You may lose most or all points for failure to follow these instructions or if you do not hand in all required files.

You must turn in the following files:

To actually turn in your finished project, follow the hand-in instructions that we have provided.

Grading

Code-sharing, working together with peers, and copying code from other sources are only allowed under restricted conditions. Make sure you read the code-sharing policy for details.

Significant reductions will be imposed for projects that do not compile. If a project is handed in late, there will be a 20 percent reduction for every 24-hour period after the deadline.