Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: why is there a difference between per fragment lightning and per vertex ?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2017
    Posts
    6

    why is there a difference between per fragment lightning and per vertex ?

    hello,

    in per fragment lightning, we use the normal that has been interpolated between vertices to compute light factor,
    in per vertex lightning, we use the per vertex normal but we let the lightning factor interpolate instead of normal


    i am noob at maths and i don't understand, why is there a difference ? in both cases the result depends on interpolated value, shouldn't the interpolated lightning factor be the same as the lightning factor we would calculate with an interpolated normal ?

    thanks

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,728
    Because many of the equations involved in lighting would plot as curves if you drew graphs of them, meaning that they don't linearly interpolate. For example, normalization involves taking a square root, and the graph of a square root is a curve.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •