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: GL_EXT_framebuffer_blit - down-sampling details?

Hybrid View

  1. #1
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128

    GL_EXT_framebuffer_blit - down-sampling details?

    Hey everyone.

    First of all, let me apologize for making an inquiry about such an archaic EXT. It's simply due to work requirements that I not ask about core stuff, no matter how badly I want to.

    When up-sampling some read-buffer to a higher-resolution draw-buffer, we can specify linear interpolation to be used as an argument to glBlitFramebuffer - at least that's my interpretation of the condition mentioned in the extension spec:

    Quote Originally Posted by GL_EXT_framebuffer_blit
    <filter> must be LINEAR or NEAREST and specifies the method of interpolation to be applied if the image is stretched.
    What about down-sampling? Normally we should not concern ourselves with implementation details, but out of specific requirement I'd like to get some insight into the likely scenarios here. Are fragments simply dropped? Is filtering in any way applied? What kind of filters come to mind?

    TIA!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    It is still GL_LINEAR or GL_NEAREST filtering. It works the same way in either direction. NEAREST means that it will compute the pixel coordinate to pull from, and then take the closest actual pixel to the computed coordinate. LINEAR means that it will compute the pixel coordinate to pull from, and linearly interpolate across the 4 nearest pixels to the computed coordinate.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,128
    Duh! pwned by wording - I thought stretching necessarily meant enlarging. Thx Alfonse.

Posting Permissions

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