He all,

I have been playing arround with some SSAO shaders I found in this thread over at GameDev:

http://www.gamedev.net/community/for...25&WhichPage=9

I created 2 versions of the shaders. One using a linear depth buffer which is stored in an RGBA texture and one using the conventional depth buffer. This because I was having some problems on older hardware with the normal depth buffer.

There is some room for improvement like using a noise texture instead of calculating it in the shader. The same goes for the sin and cos functions in the sample gathering.

Controls:
-Mouse+WSDA to look arround
-F1 to switch SSAO on an off
-F2 to switch between linear RGGA depth buffer or normal depth buffer
-F3 swith mouse capture on and off

Screenshots:
Here are 2 screenshots with the SSAO turned on and off. No other lighting calculations are done here. These where made on a Geforce 7300 LE 128 mb so don`t take the FPS to serious.
SSAO on:


SSAO OFF:


Download:
Sourcecode like always is under LGPL.
www.genesisdevice.net/ssao.zip

Chears

Luuk