FIXED: 2020.26630 - SSAO and camera space depth broken with orthographic camera

Hello,

It seems the camera space depth returns wrong values with orthographic camera, which may relate to the fact that the SSAO TOP is broken with an orthographic camera.

ssao_depth_ortho.toe (6.0 KB)

Also this one might be related :

Thank you!
Vincent!!

Thanks for the report, this bug will be fixed in builds 2020.45290 and later. Orthographic cameras will now work correctly with the Depth TOP and SSAO TOP.

2 Likes

I thought this was intendet as this was going for a long time :smiley:

Nah, it seems very common too though, found threads about Unity having the same issue. The original SSAO shader code that Nvidia shared used shortcuts assuming the projection was always perspective.

@malcolm is this the current implementation of SSAO? GitHub - nvpro-samples/gl_ssao: optimized screen-space ambient occlusion, cache-aware hbao

That implementation may be newer, but it is a port of an earlier HBAO algorithm example that Nvidia posted.

I’m just asking since it feels the current SSAO results in many cases make it pretty much unusable, either because of the bad quality or the heavy processing it needs.

I’m using a webGL based editor which also provides SSAO, I’m considering porting the frag shader over to TD since it seems to be giving better results.

Sorry, are you saying the TD SSAO is ‘unusable’ or ‘giving better results’?

the TD SSAO in many cases is giving me a texture that eats up a lot of my framerate and looks very choppy as a result.

Here is an example of basically the best possible result I could get from it as an output. 1920x1080, on a GTX1080, which is not a great looking image and at the same time eats up about 30-40fps from my framerate.

In this particular case, visually the output would be useable, but given that it eats up more performance than anything else in my scene combined (without the SSAO it runs at 60fps) it becomes unusable again.

Okay, thanks for clarifying. Yes its extremely heavy, especially when pumped up to look as high quality and smooth as you have here.