• Spy5s30288

    I have a big trouble about FrameBuffer before I read this article,thinks for you!

  • How to pass 2 textures to the shader with FBO in order to e.g. blend images? I need that for multiple images (in each iteration compare current texture with next texture(s) in stack).

  • You declare 2 sampler2D uniforms and set each one 2 a different texture.

    uniform sampler2D u_image1;
    uniform sampler2D u_image2;
      vec4 color1 = texture2D(u_image1, v_texCoord);
      vec4 color2 = texture2D(u_image2, v_texCoord);
      gl_FragColor = color1 * color2;