Fluid renderer with ssr

I am trying to use fluid renderer with ssr rendering pipeline but there is some layering issue and it works perfectly fine without ssr rp. Anyone know how to fix this?

Fluid without ssr rp: https://playground.babylonjs.com/#544N0Q#105

Fluid with ssr rp: https://playground.babylonjs.com/#544N0Q#106


It kinds of work with the geometry buffer renderer instead of the prepass renderer:

However, transparent objects (like particles) have no thickness and don’t write to the depth buffer, so SSR can’t work correctly. It’s possible to fake things a bit by adding an object that writes to the depth buffer behind the particles, like the wall I added in the PG.

The calculated depths won’t be the right ones for the particles, though, they will all have the same value (the one from the wall). That’s why the reflection of the particles are all in a flat line on the ground (it’s more visible when you rotate the camera).

In a more complex scene with different objects behind the particles which are at different depths, these artifacts are less visible. Some games simply rely on occluders existing behind the particles, see the note in Screen Space Reflections in Killing Floor 2 for eg.


Thanks @Evgeni_Popov , you are the MVP

1 Like

He definitely is ;D

1 Like