I want to blend two texture in my shader,so my code in shader like this:
out vec4 fragColor1;
out vec4 fragColor2;
void main(){
fragColor1=vec4(1.0,0.0,0.0,1.0);
fragColor2=vec4(0.0,1.0,0.0,1.0);
}
when i use
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ZERO);
it only show red on the screen,but when i use
glEnable(GL_BLEND);
glBlendFunc(GL_ZERO,GL_ONE);
it can't show green,it shows black,I don't know what's wrong and how to fix it...