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:
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.
Yes you’re right, GL_NV_explicte_multisample is also supported by Radeon since Catalyst 9.8.
it doesn’t work on my 4850 with Cat 9.9 and Win7
I’ve made a (probably) ATI-compatible version, using only GL 3.1.
You can test it: http://dabroz.scythe.pl/upload/2009/09/31NV_2.rar
it still doesn’t work same as previous version “.exe has stopped working” I tried A.I on|off.
Now it works on radeon with 10.3 cat