I read this tutorial on MSAA in deferred shading from 28byteslater.com.
It says that with explicit multisampling, we can access a specific sample.
Could we do the same from a regular texture that was tied to GL_TEXTURE_2D_MULTISAMPLE, for example?
This was the shader code that I used earlier to access individual samples (without using multitasking explication):
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 in explicit multisampling is what they use texelFetchRenderbuffer()in the shader, and the texture is attached to GL_TEXTURE_RENDERBUFFER_NV. Plus If I remember correctly that you cannot use RenderBuffer in a shader, and now we can?