Lab 6: Textures
CS 445: Computer Graphics, Fall 2012


Due Date: 5pm, Tuesday, Nov 13

Goals

Resources

Before you being, read these:

Implementing a Procedurally Generated Checkerboard Texture

Texture Coordinates

Modify the code for each of your objects (Cube, Cylinder, etc ) to include a new attribute variable for texture coordinates:

Shaders

The instructions below assume you are using the Phong shader (as opposed to the Gouraud shader), so that your color calculations are done in the fragment shader.

The Vertex Shader:

The Fragment Shader:

Implementing an Image Texture

To use images as textures, you need to be able to read images into your c++ code. We limit ourselves to tga files because they are easy to read. You may use Photoshop (or other program) to convert any images you have to this format.

No later 5pm on Tues, Nov 13, demonstrate your final program (the one with different textures and coloring) in lab and submit this code via WISE Assignments.