Homework 8

22C:151 Introduction to Computer Graphics

Due Tuesday, Dec. 2, 2008

20 points

1. Implement and submit a program corresponding to Exercise 9.1 of the textbook.

Note: your score will depend slightly on how interesting your program is. That is, if it seems to me that you put very little effort into creating the program, essentially making trivial modifications to examples from the book or web, then you will likely lose some points.


Notes on compiling and running programs with shaders:
NOTE ON ALTERNATIVE ACCEPTABLE HOMEWORK: as discussed in 11/21/08 email message to class, working with reflection and normal mapping starting from the files in this folder is also acceptable for homework 8. You can compile cubetex.c using the given Makefile, and run it to see the results of simple reflection mapping and normal mapping using cube maps (see textbook for background on reflection/normal/cube/environment mapping). Your HW8 job would be to achieve the same results using shaders. Shaders to start with (actually, they fully handle one of the two cases - reflection or normal mapping - you just have to figure out which) with are provided. To use them and see their effect, modify cubetex.c, adding shader handling code. (Also, to be CERTAIN that your shaders are having the intended effect, rather than the texture code in the application, it's worth commenting out, or removing, the three glEnable(GL_TEXTURE_GEN_...) and three glTexGeni(...) lines.)