How explicit multisampling differs from regular multisampling in OpenGL

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?

+4
1

, . OpenGL 3.2/DirectX 10 (MSAA) , "" (, ). - .

GL3.2/DX10 "" () . texelFetch (...). MSAA , G-, . - , , , Stencil Routed A-Buffering, .

, DX10- - . , , HLSL GLSL, ; , mipmaps , , . DX10 - DX10.1 .

OpenGL 3.2 (, NV_explicit_multisample), , ~ 2007 ( DX10). OpenGL 3.2 ARB_texture_multisample.

+7

All Articles