I would like to mix camera preview SurfaceTexture with some overlay texture. I am using these shaders for processing:
private final String vss =
I might have the same problem as well. after days of trying, I am proposing my solutions here. Hoping this would help others.
firstly, problem statement. just like Lukáš Jezný, I have one preview texture and one overlay texture. it works fine for nexus 4/5 and most of other types, but shows nothing on OPPO find 5, Lenovo A820, Lenovo A720.
solution:
(1)just like Lukáš Jezný, use YUV data and transforming them to RGB in the shader.
(2)multipass drawing, draw the preview texture to the framebuffer once , and read it, then draw it again to the screen.
(3)use another program before you use your own program,
GLES20.glUseProgram(another one);
GLES20.glUseProgram(your "real" program);
and it just works for OPPO find 5, Lenovo A820, Lenovo A720 and others. No one knows why......