If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
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
See Also
Contributors to this page: pyritie
,
zarfius
,
Mind Calamity
and
duststorm
.
Page last modified on Tuesday 21 of February, 2012 20:00:49 UTC by pyritie
.
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.





