I am using OpenGL ES 2.0 GLSL features for image management. What I want to achieve is to select a certain level of detail (LOD) when extracting the sample from the texture from the fragment shader. Apparently texture2DLod() not supported for shader fragments in OpenGL ES 2.0 (but there is a GL_EXT_shader_texture_lod extension, which may additionally provide.)
However, the texture2D() function provides a third optional parameter by default. As far as I understand, this parameter should be the offset added to the current LOD.
In my tests, I draw a square the size of the screen, and I increase the texture by scaling the coordinate samples. I turned on mipmapping for texture, using GL_LINEAR_MIPMAP_LINEAR as a minimization filter. The result when a sample with a nonzero offset parameter on the ARM Mali-400 GPU is shown in the image below.
ISTM that some pixels use a minimization filter, while others use a magnification filter.
How is this controlled? And how to determine the initial LOD when using offset? Can it be configured from the vertex shader?
A related question is as follows:
How does the GLSL sampler determine the minimization and therefore the level of the mipmap texture?

Update: I noticed that if I create a texture so that it covers the screen, then it looks like it looked right if it was enlarged. Now, if I add a slight offset to the coordinate pattern, then I will start to see the strip that is visible in the above image (which is further enlarged). If I do not use the offset parameter, I will not see any strapping at all.
source share