title: Alpha blending with OpenGL ES 2.0?
body: <p>What's the best way?</p>
  
  <p>I tried to do this naïvely with a fragment shader that looks like this:</p>
  
  <pre><code>varying lowp vec4 color;
  void main()
  {
      lowp vec4 alpha = colorVarying.wwww;
      const lowp vec4 one = vec4(1.0, 1.0, 1.0, 1.0);
      lowp vec4 oneMinusAlpha = one-alpha;
      gl_FragColor = gl_FragColor*oneMinusAlpha + colorVarying*alpha;
      gl_FragColor.w = 1.0;
  }
  </code></pre>
  
  <p>But this doesn't work, because it seems gl_FragColor does not contain anything meaningful before the shader runs.</p>
  
  <p>What's the correct approach?</p>