"Cavity" shader effect like Blender 2.8 viewport for Babylon.js?

Adding @RaananW for the XR part

The post process is in (ScreenSpaceCurvaturePostProcess) and will be available in the next nightly in the PG with:


The post process has both ridge and valley properties:

Do not hesitate to change adapt enhance. It is a direct copy of @Evgeni_Popov code :slight_smile:


Thanks everyone. I’m kind of amazed my little suggestion generated so much activity in such a short space of time. Awesome outcome!

When will it be possible to test in playground? :slight_smile:

It’s already in:

Clear the cache of your browser if it does not work for you.


Hi there.

For my scene I want both SSAO and SSC.

It works perfectly by employing the BJS’ original SSAO implementation. Please see see this PG.

The case is that, when I implement the same strategy with SSAO2 (in orther to gather a best performance and aesthetic, and byt the way a much less aliases) SSC is not shown, as you can check visiting this other PG.

Any help on it?

Thanks in advance for your time!

The SSAO2 implementation is using the pre-pass renderer by default, and it seems it is not compatible with SSC which is using the geometry buffer renderer to perform its computations.

I don’t know if it’s expected, maybe @CraigFeldspar will know.

A workaround is to force using the geometry buffer renderer with SSAO2 (5ith parameter of the SSAO2 constructor):

1 Like

Thanks @Evgeni_Popov.

I see an even higher performance hit with this approach, but maybe I can live with it as my app doesn´t need a specially big FPS number.

Certainly, SSAO + SSC are the way to go in technical-look developments.

Maybe SSC should use prepass also for the 2 to be compatible, but for now @Evgeni_Popov’s workaround is definitely the way to go

1 Like