CS300 Project 2 Due: Oct 19 Synopsis Implement Phong lighting and Phong shading. Instructions Replace scene.cpp in your framework with the version supplied with this project. This will generate a scene with several lights, and several simple objects, each with different surface characteristics. You are to draw these objects using Phong shading and Phong lighting calculations. Phong Shading: Modify your scanline algorithm to interpolate normal vectors at each pixel across a scanline. The code to do this will closely parallel the code you currently use to interpolate depth (z) values up each edge and across a scanline. Phong Lighting: Given a point in screen coordinates and the interpolated normal vector produced by the scanline algorithm, convert it to world coordinates, and use the Phong lighting calculation to compute a color for the pixel. All lighting calculations must be done in world coordinates. ● Pixel Position:
This is the end of the preview. Sign up
access the rest of the document.