Courses‎ > ‎Computer Graphics‎ > ‎Dyrland-Weaver‎ > ‎Work‎ > ‎

Work 10: Shed some light on the situation

posted May 1, 2018, 6:58 AM by JonAlf Dyrland-Weaver
Implement the Phong Reflection model with flat shading. (Note: if you look up information online, do not confuse this with Phong Shading).
  • You should be calculating I once per polygon.
  • Remember to limit I to be in the range [0, 255]. You may not want to do this all at once at the end.
  • There are a lot of user-defined values in lighting calculation, eventually, we will to be able to set them in our scripts. For now, pass them around to the necessary functions, and set them in either your main/parser functions. This is modeled in the provided source code.
  • Once again, our robot friend is not a great test for lighting, boxes in general are not good since they have very few polygons. 
github link: https://github.com/mks66/lighting.git
Comments