Time for Action: Phong Shading with Phong Lighting

Let's cover an example of implementing lighting using Phong shading:

  1. Open the ch03_04_sphere_Phong.html file in your browser. The page will look similar to the following screenshot:

  1. The interface is very similar to the Goraud example's interface. As previously described, it is quite evident how the Phong shading combined with Phong lighting delivers a more realistic scene. Experiment with the controls widget to see the immediate result of this new lighting model.

What just happened?

We have seen Phong shading and Phong lighting in action. We explored the source code for the vertex and fragment shaders. We also modified the different parameters of the model and observed the immediate effect of the changes on the scene.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.55.14