Phong Interpolation

The Phong method calculates the final color in the fragment shader. To do so, each vertex normal is passed from the vertex shader to the fragment shader using a varying. Because of the interpolation mechanism of varyings included in the pipeline, each fragment will have its own normal. Fragment normals are then used to calculate the final color in the fragment shader.

The following diagram summarizes the two interpolation models:

The shading method does not specify how the final color for each fragment is calculated. It only specifies where (vertex or fragment shader) and the type of interpolation (vertex colors or vertex normals) to be used.

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

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