Lab 9 - Texture Mapping and Lighting

Goals for This Lab

In this lab, we’re going to combine the past two labs to create a sphere shaded with the Blinn-Phong lighting model that uses texture maps for the material parameters.

Please download the code for the lab and go over the code.

Look though the code, paying particular attention to how the textures are being loaded. We’ll be editing main.cpp and the two .glsl files.

Task 1

Start with the Blinn-Phong lighting model from the fragment lighting lab. Rather than passing in the kd and ks as uniform parameters, load them from the provided texture files. Use s=50.0f for the exponent. You can ignore the ambient term for this lab.

Task 2

Add a moving cloud cover to the earth. Make the clouds rotate about the earth using the keyboard or with glfwGetTime().

Generated on Tue Feb 25 12:09:59 CST 2020