I want to use two outs in frag shader and both of them are not vec4. If we use extended blending functionality it allows 2 outs which are vec4 and would be given input to blend equations. Now if my out is having only one channel, how can i use it, i mean in extended blending we have out variables with all 4 channels? How can we choose to use particular out variable at a time?
i have sample shader with two out vars:
i have sample shader with two out vars:
layout(location = 0) out float fragOut0;
layout(location = 1) out float fragOut1;
void main (void)
{
fragOut0 = float(vOutColour.r) + float(0.5);
fragOut1 = float(vOutColour.b) + float(0);
}
how can i write a program which will use above frag shader.