Need help with shaders alpha

Hi guys! Help me understand how it work.
I writen some shader where modificate texture color and alpha, but alpha is doesn’t work. Why?
Fragment shader code:

void main( void ) {
  vec4 color = texture2D(uMainSampler, outTexCoord);
  ... 
  if ( border > edge_lower ) {
    color.a = 0.0;
    if ( border < edge_upper )
      color.a = (edge_upper - border) / 0.1;
  }
  gl_FragColor = vec4(color.a); // for example
}

In Phaser code use this.cameras.main.setRenderToTexture(testShader);