files/green_monkey.png

Description

In this lab you will learn about shading through the use of programmable shaders. You are required to set up the shaders and then perform diffuse shading on the monkey head. When you are done, I highly recommend you play with the shaders a bit to get a feel for them and what they can do. Play with them to better understand the graphics pipeline.

You will be following the Lighthouse 3D tutorials to gain background knowledge of programmable shaders, and then create your own. Shaders consist of two files, a vertex shader and a fragment shader. You will start with a program very similar to lab 1, where you will need to add code to compile and link to the shaders you will add.

Once you have written your shaders using the Lighthouse website as a reference, and loaded them successfully into your program, try to modify the diffuse shader a bit, or change the color used. I may ask you questions about how your code works in order to get checked off.

Code

Sample code is available here. This is not all you will need; you will need to create the two shader files with the names given in the file.

External Resources