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: Does textureLod perform filtering?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2009
    Location
    Seattle, WA
    Posts
    217

    Does textureLod perform filtering?

    I was wondering if the textureLOD command in GLSL is supposed to perform linear filtering? I noticed that on AMD hardware it does not appear to, but I did not notice this on Intel or Nvidia hardware. The spec is not clear on the matter:
    https://www.opengl.org/sdk/docs/man/...xtureLod.xhtml

    Example:
    http://steamcommunity.com/sharedfile.../?id=685549395
    Last edited by JoshKlint; 05-15-2016 at 10:50 PM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789
    Section 8.9 of the GLSL spec (my emphasis):
    Texture properties such as size, pixel format, number of dimensions, filtering method, number of mipmap levels, depth comparison, and so on are also defined by OpenGL API calls. Such properties are taken into account as the texture is accessed via the built-in functions defined below.
    (Obvious exceptions being fetch and gather, of course).

    It's much more probable that there is a bug in your code that different vendors behave differently with.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,925
    Quote Originally Posted by JoshKlint View Post
    I was wondering if the textureLOD command in GLSL is supposed to perform linear filtering?
    It is (assuming that linear filtering is enabled for the texture). The only difference between textureLod() and texture() or textureGrad() should be that textureLod() takes the level-of-detail as an explicit parameter while the others compute it from the derivatives.

Posting Permissions

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