Luuk van Venrooij
03-06-2010, 08:55 AM
He all,
I have been playing arround with some SSAO shaders I found in this thread over at GameDev:
http://www.gamedev.net/community/forums/topic.asp?topic_id=556187&PageSize=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:
http://img195.imageshack.us/img195/9818/ssaoon.th.jpg (http://img195.imageshack.us/i/ssaoon.jpg/)
SSAO OFF:
http://img693.imageshack.us/img693/295/ssaooff.th.jpg (http://img693.imageshack.us/i/ssaooff.jpg/)
Download:
Sourcecode like always is under LGPL.
www.genesisdevice.net/ssao.zip (http://www.genesisdevice.net/ssao.zip)
Chears
Luuk
I have been playing arround with some SSAO shaders I found in this thread over at GameDev:
http://www.gamedev.net/community/forums/topic.asp?topic_id=556187&PageSize=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:
http://img195.imageshack.us/img195/9818/ssaoon.th.jpg (http://img195.imageshack.us/i/ssaoon.jpg/)
SSAO OFF:
http://img693.imageshack.us/img693/295/ssaooff.th.jpg (http://img693.imageshack.us/i/ssaooff.jpg/)
Download:
Sourcecode like always is under LGPL.
www.genesisdevice.net/ssao.zip (http://www.genesisdevice.net/ssao.zip)
Chears
Luuk