I have two color textures and a depth texture in an FBO. I want to draw an alpha-blended object. I want to use the alpha channel of gl_FragData[0] for the alpha value when both color attachment 0 and color attachment 1 are blended. I need the alpha channel of color attachment 1 to store some other data. How can this be achieved?
It’s a deferred renderer with the normals and specular value stored in the second color component. Writing the alpha value out into both color components’ alpha channels would be wasteful, and force me to use one extra texture for specular values. Any ideas?