Hello,
I have read many pages on the web regarding how MSAA works in detail, for example:
https://www.opengl.org/registry/specs/ARB/multisample.txt
I understood that the pixel shader is only executed once per pixel and
that the output (the color value) is stored in each of the subsamples
which pass the coverage/occlusion tests.
Later during the resolve these color values are mixed together and
result in the final pixel color. This is pretty good described in the
3rd of the mentioned pages above.
But after reading the first page above I am a bit confused because it first says…
Each pixel fragment thus consists of integer x and y grid coordinates, [b]a color[/b], SAMPLES_ARB depth values, texture coordinates, and a coverage value with a maximum of SAMPLES_ARB bits.
…which sounds as if there are only multiple depths values per fragment
(i.e. SAMPLES_ARB depth values) but only one color value.
Then, on the same page a bit further down, it says…
After all operations have been completed on the multisample buffer, the color sample values are combined to produce a single color value, and that value is written into each color buffer that is currently enabled, based on the DrawBuffers mode.
…which is basically what I understood, that there are indeed multiple color values per fragment,
namely one for each subsample. This also makes sense as it is possible to read back each individual
sample color value via texelFetch(…,sample).
So what is now true, are there multiple color values per fragment or not? I think there is a
mistake in the first quote, no? IMHO it should be corrected in this way:
Each pixel fragment thus consists of integer x and y grid coordinates, [b]SAMPLES_ARB color values[/b], SAMPLES_ARB depth values, texture coordinates, and a coverage value with a maximum of SAMPLES_ARB bits.
Or did I completely misunderstood something?
Clarification is really appreciated!