Skip to content

Implement SSAO in the Compatibility rendering method #12059

@RobertBColton

Description

@RobertBColton

Describe the project you are working on

Compatibility game with stylized large outdoor environments that can run on a potato.

Describe the problem or limitation you are having in your project

There is no ambient occlusion available for the compatibility renderer.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Crytek's original SSAO implementation was done using only the depth texture. While it has downsides, it would at least be better than nothing when using the compatibility renderer. Certain stylized games should be able to look good and still run on a potato, and implementing this would make it possible. We can do depth buffer normal reconstruction to get semi accurate and fast results.
https://wickedengine.net/2019/09/improved-normal-reconstruction-from-depth/

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

We will use either the original Crytek SSAO that only used depth or follow one of the many other depth reconstruction algorithms.
https://wickedengine.net/2019/09/improved-normal-reconstruction-from-depth/
https://gamedev.net/blogs/entry/2293501-screen-space-ambient-occlusion-in-merc-tactics/

It is also possible to do the blur in the same shader by using a tiled screen quad with vertex interpolation.
https://www.gamedev.net/tutorials/programming/graphics/a-simple-and-practical-approach-to-ssao-r2753/

If this enhancement will not be used often, can it be worked around with a few lines of script?

You can write a shader to do it yourself, but since Godot doesn't yet support MRT, it's kind of hard to do the blur pass.

Is there a reason why this should be core and not an add-on in the asset library?

Yes, a lot of stylized games would look great with cheap SSAO and could still run on a potato. It's better that the builtin SSAO at least works rather than giving an error and forcing you into using Forward+. This solution would actually be a lot faster than directional shadows which actually look terrible in a lot of stylized games and is the reason artists sometimes avoid them entirely (especially in certain isometric games). Pre-Baked AO was generally used a lot in retro games, however it would nice to also have a generalized real time solution to save artists and programmers time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions