Logarithmic Depth Buffer for ParticleSystemSet?

Hello all,

I’m working on a project and I’m looking for a way to use Logarithmic depth buffers for the materials used in a ParticleSystemSet. As I have things setup now I’m using a SPS and I’m trying to keep it pickable. To keep the frame rate up i’m using a mix of “billboard = true” for the preview stars, and then when you get close to the star, i slap a lensflare on it and spawn a ParticleSystem (localstar). Each unit of xyz is one Km.

The problem i’m finding now is that if I up the maxZ on the cam to get the localstar to be visible, the Picking on the SPS stops working…

Was thinking there might be a way to enable Logarithmic Depth Buffer for Particles and then I can have better looking localstars, and a pickable SPS.

PG setup with some of the problems.
https://www.babylonjs-playground.com/#TUNZFH#78

the demo app with SPS is at https://globular-demo.at.damnserver.com/

As SPS relies on normal materials, I guess you should be able to simply set useLogarithmicDepth = true on the material ?

Adding @jerome who build the SPS system to know if he is got any other ideas ?

The SPS is a mesh, so all the mesh features should work exactly the same.

2 Likes