glslang Only 1 gl_FragColor

With the current spec, there is only 1 gl_FragColor variable.

How do we support existing and future hardware that can output to several colour buffers simultanously?
The AUX buffer support (which has been removed) was meant to handle this.

I’ll second that.

DX9 has multi-element textures, something which does not yet have an equivalent in the OpenGL core. Hence, I can understand that there was some hesitation to include anything like this in the shading language.

However, it is obvious that something like this will be needed in the not too distant future. Why not make gl_fragColor an array with an implementation-defined length (e.g. gl_MaxColorOutputs), similar to how gl_TexCoord[] is defined?

Even if all initial implementations only allow one output because there’s no underlying mechanism for dealing with multi-element textures, at least the shading language would be ready for it without requiring an extra revision or extension.

– Tom

Originally posted by DeanoC:
[b]With the current spec, there is only 1 gl_FragColor variable.

How do we support existing and future hardware that can output to several colour buffers simultanously?
The AUX buffer support (which has been removed) was meant to handle this.[/b]

See issue 87. It was removed simply because the shading langauge is against core OpenGL 1.4. If an extension (such as ATI_draw_buffers) that adds additional buffers is added in the future, then it might make sense to have aux data buffer return.

Tom’s suggestion about resolving this similar to gl_TexCoord defined is an interesting take on resolving it.

-mr. bill

[This message has been edited by mrbill (edited 02-27-2003).]