Questions: GL_LINEAR is not working in android GLES 3.0

Hi, I tried using Texture parameters for MIN and MAG FILTER as GL_LINEAR, but it gives a black screen for me.
Is there a way to implement this interpolation in 3D texturing? i am getting distorded images by using GL_NEAREST.


Hmm, something rather basic like linear texture filtering should normally work.
My suspicion would be that there is something else wrong especially when you say that GL_NEAREST produces ‘distorted’ images - I would expect them to be pixelated, not distorted. Is it possible that your glPixelStore settings (in particular GL_UNPACK_ALIGNMENT) are incorrect when uploading the texture data?

Actually, Image doesnt even appear on GL_LINEAR. GL_NEAREST produces blurred images where there is slight distortion. Is there any mathematical algorithm which i can implement in th shader to counter the interpolation issue?
\My pixel store parameters seem to be fine.

It’s possible to manually implement linear sampling in the shader (but a bit tedious to handle the different wrap modes and not as efficient as letting the hardware do it). For a texture of size W by H pixels the pixel centers are located at texture coords u = i/W + 1/2W and v = i/H + 1/2H for i in [0,W-1], j in [0,H-1]. You need to find the 4 texels closest to the sample location (s,t) and bilinearly interpolate their values.
For sampling at (s,t) where the fractional part of (sW) > 1/2W you want texels sW, (s+1)W, otherwise sW, (s-1)*W and similar for the vertical direction.