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

I haven’t picked through the specs, but from:

[ul]
[li]GLSL ES Spec, ver 1.00 [/li][/ul]
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.

[QUOTE=Dark Photon;1290113]
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.[/QUOTE]
ES doesn’t support clamping LoD (glTexParameter() is just filters and wrap modes). You’d have to make each mipmap level a separate texture.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.