In this assignment, we improved the quality of a simple renderer by implementing a number of lighting and material shading effects using GLSL, OpenGL's shading language. The goal of this assignment was to get basic experience with modern shader programming and to understand how material pattern logic, BRDFs, and lighting computations are combined in a shader to compute surface reflectance.
implemented the following shading:
- Phong reflectance (diffuse and specular)
- normal mapping
- computed a tangent to world transform
- sampled the normal map and computed a world space normal at that surface sample point
- environment lighting
- reflected the vector from the surface to the camera
- used the reflected vector to perform a lookup in the environment map
- spotlights
- calculated the cone angle of the light direction
- softened the boundary by interpolating the illumination intensity near the edge
- shadow mapping
- rendered the scene from the vantage point of the light source and stored the closest point in the scene at each sample point
- computed whether the current surface point is in shadow from the perspective of the light source
partnered with Elina Thadhani