Is there an equation for flat shading?

To my understanding, it is this:

$$I = I_a \times K_a + F_{att} \times I_l \times (K_d \times (N \times L))$$

Final intensity = ambient reflection x ambient reflection coefficient + (attenuation x incident light intensity x (diffusive reflection coefficient x (surface normal x Light intensity))

However, I have only found one source for this equation (my lecture slides).

Are there any other sources to confirm this is the equation for flat shading? I can't find one.

  • $\begingroup$ The (surface normal x Light intensity) / diffuse part, shouldn't that be N.L * lightColour * diffuseColour ? $\endgroup$ – PaulHK Mar 17 '17 at 7:56
  • $\begingroup$ I didn't add a divide anywhere in the equation. It is lightIntensity*(diffusive reflection coefficient * (N.L)) $\endgroup$ – S.A Mar 17 '17 at 8:33
  • $\begingroup$ @PaulHK Is it possible you could give a reference to where you found the equation for flat shading? $\endgroup$ – S.A Mar 17 '17 at 8:56
  • $\begingroup$ OpenGL's fixed function pipeline, I found a decent reference here > cs.cmu.edu/afs/cs/academic/class/15462-s09/www/lec/02/… $\endgroup$ – PaulHK Mar 17 '17 at 9:33
  • $\begingroup$ This equation doesn't consider flat or smooth shading, that is down to you to use either a fixed normal per triangle or interpolated vertex normals. $\endgroup$ – PaulHK Mar 17 '17 at 9:34

I don't think having a equation for flat shading is meaningful as such. Mainly because the formula for flat shading is same as the formula for the model the flat shading is emulating. The difference is that flat shading is operating per primitive rather than per point or per vertex.

So there can in fact exist multiple formulas that work differently but are still all flat shading.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.