Texture mixing using GLSL makes strange result in Galaxy-S8(Mali G71)

Hello, I'm making a simple image filter app using OpenGL ES

What I'm currently working on is implementing Lowpass filter in GPUImage(https://github.com/BradLarson/GPUImage/blob/master/framework/Source/GPUImageLowPassFilter.h)

it basically mixs the previously mixed camera texture and current camera image.

I tested my code with several other smartphones(Galaxy S10, Nexus 6P and etc) and it worked well, however on Galaxy S8 it gives the strange result like below picture.

My shader codes are following:


uniform mat4 uOrientationM;
uniform mat4 uTransformM;
attribute vec2 aPosition;
varying vec2 vTextureCoord;

void main() {
gl_Position = uOrientationM * vec4(aPosition, 0.0, 1.0);
vTextureCoord = (uTransformM * vec4((aPosition + 1.0)*0.5, 0.0, 1.0)).xy;


varying vec2 vTextureCoord;
uniform sampler2D sTexture1;
uniform float filterStrength;

void main() {
vec4 texColor0 = texture2D(sTexture, vTextureCoord);
vec4 texColor1 = texture2D(sTexture1, vTextureCoord);
gl_FragColor = mix(texColor0, texColor1, filterStrength);

Is there anything wrong? or what can be a cause for this?

Thanks in advance.

  • Are you reading from a texture which is also bound to the framebuffer as a color attachment? Simultaneously reading and writing the same texture is bad, as the framebuffer memory is not coherent on a tile-based architecture.

    If it's not this can you share an APK which reproduces the issue, and we can take a closer look?