Skip to main content

History: Simple SSAO

Preview of version: 11

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:

Sample Material - Sibenik
Copy to clipboard
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:

Initializing SimpleSSAO
Copy to clipboard
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

SSAO Off
SSAO Off
SSAO On
SSAO On
SSAO Off
SSAO Off
SSAO On
SSAO On
SSAO Off
SSAO Off
SSAO On
SSAO On

SimpleSSAO - 1 Line SSAO
SSAO (Screen Space Ambient Occlusion) Demo + Source
SSAO Compositor

See Also

Implementing SSAO in Mogre

History

Information Version
Fri 28 of Aug, 2015 08:55 GMT-0000 Mind Calamity Fixed broken link. 12
Sun 13 of Jul, 2014 20:32 GMT-0000 Mind Calamity 11
Tue 21 of Feb, 2012 20:00 GMT-0000 pyritie 10
Mon 06 of Feb, 2012 11:14 GMT-0000 duststorm Added links to related forum topics 9
Mon 06 of Feb, 2012 11:14 GMT-0000 duststorm Added links to related forum topics 8
Mon 06 of Feb, 2012 11:13 GMT-0000 duststorm 7
Thu 02 of Feb, 2012 13:33 GMT-0000 zarfius 6
Tue 31 of Jan, 2012 12:47 GMT-0000 Mind Calamity Updated download link. 5
Wed 25 of Jan, 2012 19:12 GMT-0000 Mind Calamity 4
Wed 25 of Jan, 2012 19:11 GMT-0000 Mind Calamity 3
Wed 25 of Jan, 2012 19:05 GMT-0000 Mind Calamity 2
Wed 25 of Jan, 2012 18:34 GMT-0000 Mind Calamity 1