Skip to content

Replace SAO with ASSAO as Godot's new SSAO - #44182

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
clayjohn:ASSAO
Dec 22, 2020
Merged

akien-mga merged 1 commit into
godotengine:masterfrom
clayjohn:ASSAO

Conversation

@clayjohn

@clayjohn clayjohn commented Dec 8, 2020 •

Copy link
Copy Markdown
Member

Supersedes: #42077

This is a direct port of Intel's ASSAO using some optimizations from AMD's CACAO.

This is significantly faster and higher quality than our current SSAO. It is also much higher quality than MSSAO in #42077 but is slower.

Timing on RX 5600 XT
ASSAO

Lowest Quality Highest Quality
Full Size 0.2 ms 1.1 ms
Half Size 0.12 ms 0.46 ms

SAO (currently broken on master)

Lowest Quality Highest Quality
Full Size 2 ms 4ms
Half Size

Old SAO
sao-hq-sponza

New ASSAO
ASSAO-uq-sponza

New ASSAO - Low Quality - Half Resolution
ASSAO-lq-hr-sponza

Not used MSSAO

mssao-hq-sponza

@clayjohn clayjohn added this to the 4.0 milestone Dec 8, 2020
@clayjohn
clayjohn requested a review from reduz December 8, 2020 06:37
@akien-mga akien-mga changed the title Replace SAO with MSSAO as Godot's new SSAO Replace SAO with ASSAO as Godot's new SSAO Dec 8, 2020
@clayjohn
clayjohn force-pushed the ASSAO branch 2 times, most recently from aa87a79 to ee18efb Compare December 9, 2020 05:53
@Calinou

Calinou commented Dec 9, 2020 •

Copy link
Copy Markdown
Member

Is it intended that I can see the textures' details on the ASSAO screenshot (even the half-resolution one)? I can't see texture ambient occlusion on the SAO and MSSAO screenshots.

@clayjohn

clayjohn commented Dec 9, 2020

Copy link
Copy Markdown
Member Author

@Calinou yep! ASSAO uses the normal buffer to generate SSAO while our implementation of SAO ignored it and MSSAO couldn't use it.

So what your seeing is not the texture's AO, but a high detail AO generated from normals.

@Calinou

Calinou commented Dec 9, 2020 •

Copy link
Copy Markdown
Member

@clayjohn Good to know 🙂 Does this mean AO texture maps are still relevant? What about #43957 ?

@clayjohn

clayjohn commented Dec 9, 2020

Copy link
Copy Markdown
Member Author

@Calinou AO texture maps are much higher quality than SSAO, plus they can be used even when the object doesn't have a normal map. There is no reason not to use both AO maps and SSAO together IMO.

@clayjohn
clayjohn force-pushed the ASSAO branch 3 times, most recently from e4c8067 to 4de129a Compare December 22, 2020 06:53
@clayjohn
clayjohn marked this pull request as ready for review December 22, 2020 06:53
@clayjohn
clayjohn requested a review from a team as a code owner December 22, 2020 06:53
@reduz

reduz commented Dec 22, 2020

Copy link
Copy Markdown
Member

Look OK, I am still in doubt about exporting so many parameters to Environment, but I need to try them for a while to see what is actually important.

@akien-mga
akien-mga merged commit 6e43c68 into godotengine:master Dec 22, 2020
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@Zireael07

Copy link
Copy Markdown
Contributor

Compute shaders again or something backportable to 3.x?

@Calinou

Calinou commented Dec 22, 2020 •

Copy link
Copy Markdown
Member

Compute shaders again or something backportable to 3.x?

Indeed, compute shaders are still required for this feature. Sorry 🙁

That said, I think it would be possible to backport the half-resolution setting we had in the old SAO to the 3.2 branch. This should provide significant performance improvements. Right now, in 3.2, SAO is always computed at full resolution.

@clayjohn

Copy link
Copy Markdown
Member Author

@Zireael07 @Calinou in theory the original ASSAO could be ported to GLES3 as it's all done in a pixel shader. However, it would require duplicating all the work I just did here.

@atirutw

atirutw commented Sep 9, 2021

Copy link
Copy Markdown
Contributor

it would require duplicating all the work I just did here.

I think it would still be worth it to backport, though. IMO, there might be 3.x games that want realistic graphics but cannot move to 4.x for some reasons, and #48503 affects them.

@Calinou

Calinou commented Sep 9, 2021

Copy link
Copy Markdown
Member

@atirut-w Someone was working on implementing GTAO in 3.x instead: godotengine/godot-proposals#3223

@clayjohn
clayjohn deleted the ASSAO branch June 22, 2022 05:52
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Replace SAO with ASSAO as Godot's new SSAO
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Replace SAO with ASSAO as Godot's new SSAO
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026
Replace SAO with ASSAO as Godot's new SSAO
Shane-Gadsby pushed a commit to Shane-Gadsby/godotwebgpu that referenced this pull request Sep 21, 2026
Replace SAO with ASSAO as Godot's new SSAO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants