Simple SSAO - A 1-class solution for SSAO.
Description
To have SSAO in OGRE usually you need tons of code and shaders, well nullsquared posted a demo that avoided that, and it provided a pretty decent quality, so this is his code, converted into 1 easy to use class, which can provide your application with SSAO with only 1 line of code (2 including the header "include" statement).
See MOGRE Simple SSAO for Mogre source code.
Download
You can find the full pre-compiled demo + source here.
Usage Instructions
1. Add the sub-directories in the 'data/ssao/materials' directory to your resource locations.
2. Derive all your materials from diffuse_template like so:
import diffuse_template from "diffuse.material" material sibenik/poplocenje : diffuse_template { technique { pass { ambient 0 0 0 1 diffuse 0.65098 0.647059 0.596078 1 texture_unit { texture KAMEN320x240.jpg } } } }
The above example uses one of sibenik's (the "church" in the Deferred Shading Demo) materials. (You need to do this for all of the materials you wish to be affected by the SSAO compositor.)
3. Add this to your code:
PFXSSAO* mSSAO = new PFXSSAO(mWindow, mCamera);
Assuming that mWindow is the render window, and mCamera is of course - the camera. (And they're initialized)
That's it! After that, you've got SSAO on your scene.
Screenshots
Credits and related Forum topics
SimpleSSAO - 1 Line SSAO
SSAO (Screen Space Ambient Occlusion) Demo + Source
SSAO Compositor