title: What is the difference between Phong Shading and Gouraud Shading?
body: <p>As I understand it, <em>Gouraud</em> shading calculates light color for each vertex and does interpolation on that color, whereas <em>Phong</em> shading interpolates the normal for each pixel and calculates light color based on that interpolated value.</p>
  <p>However, when I tried to derive the light color mathematically, I ended up with the same formula for both ways!</p>
  <p><img src="https://i.stack.imgur.com/1JMSJ.jpg" alt="figure i draw for that" /></p>
  <p>(Where <em>n1</em> and <em>n2</em> are the normals of the two vertices, <em>t</em> is the coefficient for interpolation, <em>L</em> is the light direction, and the plane on the top and the dotted line means screen and a pixel.)</p>
  <p>The light colors for the two methods are derived as:</p>
  <ul>
  <li><p>Gouraud: <code>L = t*dot(n1,L) + (1-t)*dot(n2,L)</code></p>
  </li>
  <li><p>Phong: <code>L = dot(t*n1+(1-t)*n2,L)</code></p>
  </li>
  </ul>
  <p>and the results are the same.</p>
  <p>Can anyone tell me what's wrong with my derivations?</p>