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 seems to be inverted in my scene? #115

Closed
HybridFox opened this issue Feb 22, 2022 · 10 comments
Closed

SSAO seems to be inverted in my scene? #115

HybridFox opened this issue Feb 22, 2022 · 10 comments

Comments

@HybridFox
Copy link

So i am kind of out of ideas for what this issue could be. But i am trying to simply implement SSAO in my three fiber scene. Using these settings (and with blendFunction NORMAL) I am able to get this showing:
image

But the SSAO seems to be inverted and incorrect, if anyone has an idea what i am doing wrong or with what settings i could fix this, i will be eternally grateful!

@drcmda
Copy link
Member

drcmda commented Feb 23, 2022

yep, noticed it, too, postprocessing changed how ssao works it seems. i tried to look up what's going on but it seems to go through a major refactor and it's not so easy to figure out what the steps we would have to take are. pmndrs/postprocessing#279

@vanruesc
Copy link
Member

Did this work with previous versions of postprocessing? Minor or patch versions are not supposed to introduce breaking changes; if they do then that's a bug. I'll investigate.

@drcmda
Copy link
Member

drcmda commented Feb 23, 2022

hello @vanruesc yes, this came with an npm update, not a patch, a minor feature update.

-    "postprocessing": "^6.23.3",
+    "postprocessing": "^6.24.0",

@vanruesc
Copy link
Member

Is there any existing SSAO sandbox I could play around with?

@mikelyndon
Copy link

I ran into the same thing yesterday. Here's a broken version.
https://codesandbox.io/s/postprocessing-ssao-forked-xs05e0?file=/src/index.js
And an older working version
https://codesandbox.io/s/postprocessing-ssao-forked-ldgp2c

@vanruesc
Copy link
Member

vanruesc commented Feb 23, 2022

I tracked down the issue to this line:

if (normalPass) normalPass.enabled = false
which was changed in 97cd9b6. The NormalPass never gets re-enabled and thus never runs.

drcmda added a commit that referenced this issue Feb 23, 2022
@drcmda
Copy link
Member

drcmda commented Feb 23, 2022

oh my, what a typo :-S that fixed it! thanks a bunch @vanruesc

@HybridFox
Copy link
Author

Indeed, v2.1.5 fixes it! Thank you so much for the quick action!

@PlopTheReal
Copy link

I'm on @react-three/postprocessing 2.1.6 + postprocessing 6.25.0 it seems I have this problem.

@PlopTheReal
Copy link

I've updated all the libs to the latest, it's ok!

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

No branches or pull requests

5 participants