I have these two shaders i want these two to combine one shader draws texture perfectly and the other draw colors of lines perfectly?
private final String fragmentShaderCode =
"precision lowp float; \n"
+"uniform vec4 uTex0; \n"
+"void main(){ \n"
+" gl_FragColor = uTex0; \n"
+"} \n";
other one
private final String fCode =
"precision mediump float; \n"
+"uniform sampler2D uTex0; \n"
+"uniform vec4 uTex1; \n"
+"varying vec2 v_TexCoordinate; \n"
+"void main(){ \n"
+" gl_FragColor = texture2D(uTex0, v_TexCoordinate); \n"
+"} \n";
when i use the first one it will draw line colors perfectly but when i use the second one the line colors will be of the texture color how can i control this? if i use the just second shader result is like this
lines are black but in actual i am setting line colors like this through handle
texHandle = GLES20.glGetUniformLocation(sProgram, "uTex0");
GLES20.glUniform4fv(texHandle, 1, LineColor, 0);
it should draw like this