I was reading this tutorial on MSAA in deferred shading, from 28byteslater.com.
It says that in explicit multisampling we can access a particular sample.
Could not we do the same from a regular texture that was bound to GL_TEXTURE_2D_MULTISAMPLE for instance?
This was the shader code that I used to use earlier for accessing individual samples (without using explict multisampling):
uniform sampler2DMS Diffuse;
ivec2 Texcoord = ivec2(textureSize(Diffuse) * In.Texcoord);
vec4 colorFirstSample = texelFetch(Diffuse, Texcoord, 0);
vec4 colorSecondSample = texelFetch(Diffuse, Texcoord, 1);
vec4 colorThirdSample = texelFetch(Diffuse, Texcoord, 2);
The only thing I see different in explicit multisampling is that they are using texelFetchRenderbuffer() in shader and texture is bound to GL_TEXTURE_RENDERBUFFER_NV.
Plus If I remember correctly its not possible to use a RenderBuffer in shader and now we can?