Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Interpolation of colors after clipping

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2013

    Interpolation of colors after clipping

    Hello All,

    I have a small question regarding interpolation of colors after the clipping stage.

    Say i have a quad, that gets intersected by the view frustum in such a way that
    after clipping, i get two points newly generated. So, the frustum clips the quad in half
    thus generating two new vertices.

    Now, i would have given per vertex colors at the initial 4 vertices. What would be the colors
    given to these newly generated vertices after clipping?

    I understand the per fragment interpolation. But since that is at a later stage in the pipeline, i was wondering what color
    is provided to the new vertices.

    Can anyone please explain this?

  2. #2
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Put simply: attributes (like colors) are linearly interpolated when clipped.

    You can read section 13.5.1 "Clipping Shader Outputs" in the spec for all the details (like flat shading).

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2013
    Thanks for the reply a arekkusu!

Posting Permissions

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