Simple SSAO        
Print

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(external link) 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(external link).

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
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
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(external link)
SSAO (Screen Space Ambient Occlusion) Demo + Source(external link)
SSAO Compositor(external link)

See Also

Implementing SSAO in Mogre(external link)


Contributors to this page: pyritie582 points  , zarfius345 points  , Mind Calamity816 points  and duststorm1832 points  .
Page last modified on Tuesday 21 of February, 2012 20:00:49 UTC by pyritie582 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.