OpenGL 3.2 Explicit Multisample Demo

OpenGL 3.2 Explicit Multisample Demo



Tomasz Dąbrowski has released a small deferred shading demo that shows the use of explicit multisample, a recent feature exposed by NVIDIA graphics cards. The demo use an OpenGL 3.2 codepath (OpenGL 3.2 is not required for NVIDIA explicit multisample). Explicit multisample is accessible via the GL_NV_explicit_multisample. This extension is available in ForceWare 180.42 and in the latest R190.89.

You can download the demo HERE

Explicit multisample allows to access to individual samples of an multisample buffer. In a deferred rendering, you can, for example, accuratly read the normals of a normal buffer with a routine like this one (GLSL pixel shader):

#extension GL_NV_explicit_multisample : enable
...
const int samples = 4;
...
...
for (int i = 0; i < samples; i++)
{
  // AA renderbuffers are addressed with integers
  vec3 diffuse = texelFetchRenderbuffer(diffuseSamp, uv, i).rgb;
  vec3 position = texelFetchRenderbuffer(positionSamp, uv, i).xyz;
  vec3 normal = texelFetchRenderbuffer(normalSamp, uv, i).xyz;
  result += compute_lighting(diffuse, position, normal);
}
...

In a word, we can use mulisampled buffers with the precision of non sampled buffer. For more explanation, read Tomasz article:
What is and why do we need explicit_multisample? (or how to do real antialiasing in deferred shading).

The FPS evolution on my GeForce GTX 295:

OpenGL 3.2 Explicit Multisample Demo

OpenGL 3.2 Explicit Multisample Demo

OpenGL 3.2 Explicit Multisample Demo

[via]

6 thoughts on “OpenGL 3.2 Explicit Multisample Demo”

  1. martinsm

    Hmm, is explicit multisample really recent feature for Nvidia? I remember that it is available as extension already for a year or more for Nvidia cards.
    But for ATI cards it really is recent feature – NV_explicit_multisample is available starting with 9.8, if remember correctly.

  2. Korvin77

    it still doesn’t work same as previous version “.exe has stopped working” I tried A.I on|off.

Comments are closed.