Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSAO doesn't play well with smooth shading #8237

Closed
Zylann opened this issue Apr 3, 2017 · 5 comments
Closed

SSAO doesn't play well with smooth shading #8237

Zylann opened this issue Apr 3, 2017 · 5 comments

Comments

@Zylann
Copy link
Contributor

Zylann commented Apr 3, 2017

Tested on Godot 3.0 af282b5
Windows 10 64 bits nVidia GeForce 940M

I generated a smooth mesh out of voxels, it looks smooth, but SSAO makes its edges appears anyway:

image

I understand it's based on depth, in which case it will indeed make "edges" stand out. But what's the point of having a smooth mesh then? Is there any way of using the normals to improve this?

Also, borders of the screen got affected by SSAO too, it doesn't looks right.

Could be related to #8120

@karroffel karroffel added this to the 3.0 milestone Apr 17, 2017
@akien-mga akien-mga changed the title [3.0] SSAO doesn't play well with smooth shading SSAO doesn't play well with smooth shading May 18, 2017
@reduz
Copy link
Member

reduz commented Jun 13, 2017

This is a known limitation of SSAO, unfortunately there is not much it can be done. You can even see this happen in blockbuster titles like Zelda BOTW. Best you can do is create geometry that is not affected by this, make the SSAO radius bigger or not use SSAO.

@reduz reduz closed this as completed Jun 13, 2017
@Zylann
Copy link
Contributor Author

Zylann commented Jun 13, 2017

I had a look at Unity terrains which are a soup of triangles like the one I shown, but somehow I don't see such artefacts.

@reduz
Copy link
Member

reduz commented Jun 13, 2017 via email

@Zylann
Copy link
Contributor Author

Zylann commented Jun 13, 2017

Hmm after more testing with a very similar mesh, Unity does have the same issue, though it looks slightly different (this is an Obscurance image effect with a radius of 0.3, in case it matters):

Enabled:
image

Disabled:
image

I would even say it looks better even though there are visible edges, not sure how to explain why^^"
Maybe that's the gradients...

@reduz
Copy link
Member

reduz commented Jun 13, 2017

looks like the same thing you have on Godot with less intensity..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants