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