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 3 of 3

Thread: Interpolation functions

Hybrid View

  1. #1
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167

    Interpolation functions

    A question more or less just of curiosity: Is it possible to use another interpolation function instead of linear interpolation for particular varying vertex attributes?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    You can't vary vertex attributes. Vertex attributes are what you pass into vertex shaders. They don't get interpolated. Only vertex shader outputs get interpolated.

    As for interpolating outputs, no, you can only pick between perspective-correct interpolation, window-space linear interpolation, and no interpolation. You could try to code up something yourself, but those are what the system provides.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    I guess with coding-up something you mean in a fragment program? That is something I would like to avoid in this particular case:
    It was just a thought I came across when observing kind of unexpected and undesired visual results when rendering a cube whose corner vertices were defined with smoothed normal-vectors.
    Thanks

Posting Permissions

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