i am trying to make sense of the effect, but i don't get near to the ssao effect in three/examples. this is how it looks in the original: https://codesandbox.io/s/react-three-fiber-react-spring-8fo01 (Effects.js)

and here's my attempted port: https://codesandbox.io/s/react-three-fiber-react-spring-z7tt5 (Effects.js)

in the original ssao these boxes look like they throw shadows, postprocessings ssao seems to be more concerned with making individual object faces pop out.
i've tried shifting the config back and forth, but haven't gotten relatable results so far. both sandboxes have the same near/far plane settings. is there anything i could improve?
Hi,
you forgot to add the normalPass to the composer 馃挜
I've also adjusted the SSAO settings to account for your camera settings:
https://codesandbox.io/s/react-three-fiber-react-spring-kml6w
Note that the distance thresholds and falloffs depend on your camera near and far plane settings.
Btw: I noticed the SMAA loader fix; I'll add a fix for that when I get a chance.
Oh, and to answer your question: no, the SSAO implementation in this library is not the same as the one found in the three.js examples. It uses a spiral sampling pattern and doesn't blur the shadows, which gives it a grainier look. The advantage is that it's more accurate and exhibits less haloing.
The current SSAO implementation in three uses a randomized sampling pattern and blurs the result.
wow, that's awesome! thanks for the help! i think it looks great now.
Btw: I noticed the SMAA loader fix; I'll add a fix for that when I get a chance.
Is there a fix for this? THREE.Loader.load goes (url, onLoad, onError), that's what i've modelled useLoader after. but smaaloader doesn't seem to need the url arg.
Is there a fix for this?
It should be possible to emulate method overloading by checking whether the first parameter is a function or not. The number of arguments also plays a role, I think.
@drcmda SMAAImageLoader now properly extends three~Loader in [email protected].
thanks so much!
Most helpful comment
Oh, and to answer your question: no, the SSAO implementation in this library is not the same as the one found in the three.js examples. It uses a spiral sampling pattern and doesn't blur the shadows, which gives it a grainier look. The advantage is that it's more accurate and exhibits less haloing.
The current SSAO implementation in three uses a randomized sampling pattern and blurs the result.