chaosfire / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

SSAO (Screen Space Ambient Occlusion) #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Implement an SSAO technique to improve the graphics.

Some techniques will require to render a linear depth map.

- gamerendering.com -> SSAO : 
http://www.gamerendering.com/category/lighting/ssao-lighting/

- SSAO demo from ogre samples
   I'm not sure if it needs the deferred shading in order to work - if so, it's probably useless, but if it can work without it, it would be very easy to implement (only one listener required, no depth RTT or anything)

- SSAO_demo.7z by nullsquared on ogre forums: 
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=47927
   this one looks best in my opinion.
   (note the links in first post are broken, at the last page there is a working link)

Original issue reported on code.google.com by scrawl...@gmail.com on 15 Oct 2011 at 9:25

GoogleCodeExporter commented 8 years ago
Since I havn't started yet I'm emptying "owner" field. Someone else can pick it 
up too.

Original comment by scrawl...@gmail.com on 16 Oct 2011 at 8:25

GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 22 Oct 2011 at 7:34

GoogleCodeExporter commented 8 years ago
the SSAO support is now checked in .
2 issues left :
1-handling materials with alpha (trees)
2-some pieces of the road normals are flipped , causing wrong SSAO (darker 
results)

Original comment by a.isma...@gmail.com on 29 Oct 2011 at 9:32

GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 29 Oct 2011 at 9:51

GoogleCodeExporter commented 8 years ago
I've fixed "2-some pieces of the road normals are flipped , causing wrong SSAO 
(darker results)" by setting the appropriate cull_hardware mode for the ssao 
technique.

Original comment by scrawl...@gmail.com on 31 Oct 2011 at 8:26

GoogleCodeExporter commented 8 years ago
My guess for 1 (I'm no expert at this) would be to add a texture unit (alpha 
texture) to the ssao technique and read the alpha value from it in the shader?

Original comment by scrawl...@gmail.com on 31 Oct 2011 at 8:30

GoogleCodeExporter commented 8 years ago
thanks for fixing 2 .you are right about 1, added now .let me know if there is 
any issues with it before resolving this 

Original comment by a.isma...@gmail.com on 1 Nov 2011 at 8:08

GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 1 Nov 2011 at 10:57

GoogleCodeExporter commented 8 years ago
Ok looks like all visual issues are solved. Now next thing would probably be 
better performance. I don't know about you but for me I get like 30-40% fps 
loss when turning on SSAO.

We could render the geometry map in a lower resolution than screen resolution 
(e.g. 1/2) and upsample while blurring. Correct?

Original comment by scrawl...@gmail.com on 1 Nov 2011 at 1:13

GoogleCodeExporter commented 8 years ago
the main reason for the slow down is not the post processing effect ,it is the 
fact that objects get rendered twice each frame .i want to add MRT to the 
pipeline so that the draw call write to the regular ,normal at the same time.

the ssao buffers get down sampled 2x and blurred already 

Original comment by a.isma...@gmail.com on 2 Nov 2011 at 12:26

GoogleCodeExporter commented 8 years ago
Looks like there is still a lot to do with MRT. It was buggy and is now in a 
seperate branch.

Original comment by scrawl...@gmail.com on 4 Nov 2011 at 12:24

GoogleCodeExporter commented 8 years ago
2 implementations of SSAO with and without MRT depending on the hardware 
configurations ,what is left is to merge the branch

Original comment by a.isma...@gmail.com on 8 Nov 2011 at 4:21