Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Do Mär 28, 2024 13:07

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Mo Jun 03, 2013 18:02 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Who can point me to an easy to understand tutorial on SSAO (Screen Space Ambient Occlusion)?

I already found some on the internet but somehow thing do not get clearer for me.
http://www.michaelkeutel.de/computer-gr ... sion/ssao-–-implementation-in-opengl-using-glsl/
http://john-chapman-graphics.blogspot.n ... orial.html
http://www.gamerendering.com/2009/01/14/ssao/
http://devmaster.net/posts/3095/shader- ... -occlusion

So far i think i need to:
a) setup a noise texture
b) setup a linear depth buffer
c) render the scene
d) render a quad over the screen with an ssao shader attached to it (include a blurring step?)

Am i thinking in the right direction. Or should i stop thinking and start writing some code?

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Do Jun 06, 2013 22:37 
Offline
DGL Member
Benutzeravatar

Registriert: Di Mai 18, 2004 16:45
Beiträge: 2621
Wohnort: Berlin
Programmiersprache: Go, C/C++
You have to split up step d into 4 steps.
d) render quad with ssao shader into a shadow texture/fbo target
e) render the shadow target into the shadow target with a horizontal blur
f) render the shadow target into the shadow target with a vertical blur
g) render the shadow buffer into the back buffer or color buffer(depending on your render pipeline)

The result of your shadow textures will also be rendert into the shadow buffer combined with the ssao.
The easiest way to implement ssao is to use a deffered renderer, because you get everything you need in the depth and normal render targets.
You also use a shadow target to combine this with the color target into a shaded render image.
The noise map is used to get some samples around the current processed texel.
The shader pick up the normal in the noise texture, add the offset of the normal to the current uv and pick up the normal and depth of the texel at the target position.
You can use more then one sample per texel which improve the quality of the ssao but cost much more time on the gpu.
If the depth nearly the same of the current texel or the normals show nearly in the same direction, then the texel will be shaded bright else it's shaded dark.
The difference between all the ssao algorithm is this calculation.
Depending on the algorithm Halo's or wrong occlusions can happen.

_________________
"Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren"
Benjamin Franklin

Projekte: https://github.com/tak2004


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 11 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.073s | 21 Queries | GZIP : On ]