Hi Bram,

Deferred Shading or rendering to MRT doesn't support standard multi-sampling, as the MSAA is only used in the frame buffer resolve.
There are however multiple options.
1. Make all RenderTargets multisampled and use sampler2DMS and texelFetch( sampler, texcoord, sample ) in your shaders. 2. Use super-sampling, i.e. your render target is bigger than your actual display resolution (2048x2048 vs. 1024x1024) 3. Use postprocessing anti-aliasing. Deferred shading gives you an advantage here, as you usually have the normal and depth information ready to use it for sophisticated edge detection. 4. Rely on built in post-processing anti-aliasing such as FXAA on nvidia cards.

When choosing 1) there are some serious drawbacks. You will have to make most targets from your gbuffer pass multisampled and thus having a much higher load on the fragment shaders and bandwith. There are some techniques to multi-sample only fragments that are on an edge, but still there will be a lot of work. Use you preferred internet search to find some papers and other docs about multi-sampling and deferred shading/lighting.

Option 2) will also be fairly limited, as it will produce really good antialiasing only if you have like 4 times oversampling (so 1920x1080 would be 8192x8192, which is a guaranteed killer on most GPUs)

I personally use a mix of 2) and 3) for projects where quality doesn't have to be excellent
Option 1) is the best, but is slow if done naively.

cheers
Sebastian

P.S.
Search the mail archive, there are some question of mine regarding the multi sampled buffer setup.

When I switched from 'normal' rendering to deferred rendering (or how you call 
it) I noticed a difference in how it looked, while it should look the same.

I believe now that it looks different because I use setNumMultiSamples


Code:
osg::DisplaySettings::instance()->setNumMultiSamples( 4 );



But in the render to multiple-textures it does not seem to do this. Is it even 
possible to do this?

I write colors, normals and world coodinates to 3 different buffers, so I 
wouldn't really know if it's possible to do multi sampling on that (does it 
also multi sample the normals etc. then?)

Anyone who can tell me more about this?

Thanks a lot!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54201#54201





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to