- Labs:
-
Fractal Terrains:
Review from last week: Projection and viewport transformations.
How do you set the light location?
How do Normals transform? When do we need to be careful?
Continue discussion of Shaders:
- Shaders and the openGL pipeline.
- Communication between openGL and GLSL.
- Overview of GLSL language - See the following:
- Implementing the Phong Lighting Model in the vertex shader. (Gouraud Shading)
- Implementing the Phong Lighting Model in the fragment shader. (Phong Shading)
- Implementing a color map in the shader - you need this for coloring the fractal labdscape. Two GLSL functions
that are useful are: