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: GLSL ES Version 100 texture lod access.

  1. #1
    Newbie Newbie
    Join Date
    Jan 2018
    Posts
    1

    GLSL ES Version 100 texture lod access.

    Hello guys,

    This is a platform related question. I have being using an extension on Windows and iOS platform : GL_EXT_shader_texture_lod. The reason is that I need this extension for textureCubeLodEXT. However, this won't work on Android since normally GL_EXT_shader_texture_lod is not implemented. However, I need to a way to explicitly assign the LOD levels when sampling the textures. Have anyone done it for Android?

    I would appreciate if anyone can suggest how I can do it if I want to stick to GLSL ES V100 if possible.

    Thank you in advance.

    Todd

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,511
    I haven't picked through the specs, but from:


    it appears that texture*Lod is supported in the core spec, albeit only in vertex shaders. Do you need this in a fragment shader, or can you make use of this in a vertex shader (possibly with a finer mesh and interpolation)?

    If not, have you considered clamping the min/max sampling levels for the texture in GL state? That doesn't give you dynamic control of LOD in the shader, but if you need access to multiple LODs, you could possibly consider a pass per LOD.
    Last edited by Dark Photon; 01-16-2018 at 06:23 AM.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,955
    Quote Originally Posted by Dark Photon View Post
    If not, have you considered clamping the min/max sampling levels for the texture in GL state? That doesn't give you dynamic control of LOD in the shader, but if you need access to multiple LODs, you could possibly consider a pass per LOD.
    ES doesn't support clamping LoD (glTexParameter() is just filters and wrap modes). You'd have to make each mipmap level a separate texture.

Posting Permissions

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