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: Access mipmap level in fragment shader [OpenGL ES 2.0]

  1. #1
    Newbie Newbie
    Join Date
    Jul 2012
    Posts
    1

    Access mipmap level in fragment shader [OpenGL ES 2.0]

    Hello,

    I know that I can adjust the mipmap level when sampling a texture in a fragment shader by using texture2D with the additional parameter bias.

    However, by using 'bias' you're implicitly adding a bias to the current level-of-detail. I want to be able to control the level-of-detail and thus I would like to override any level-of-detail computed within the hardware itself.

    What are my options here?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Default GLSL ES 2.0 doesn't have this ability. It does have LOD texturing functions, but those can only be used in vertex shaders.

    However, the EXT_shader_texture_lod allows you to use versions of these functions in fragment shaders. I have no idea how widely this is available.

Posting Permissions

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