Particle and DepthofFiled

Is it possible to have a depth of field effect using particleSystem only?

I tried to play with depthoffiled parameters but particles are either all blurry or all clear but it never depends on their position in the world.

Here is a playground which shows the problem:
See line 60 to play with the depthoffield parameters.

However the motion blur effect is working as you can see in the example.


1 Like

pinging @sebavan

I ll have a look ASAP

1 Like

The DOF effect uses the depth renderer which can not render particles to it due to ordering and transparency issue. It is then not possible to use with particles.

Hum, not possible at all? (It doesn’t sound BabylonJS to me :smile:)

The goal would be to have this kind of particle effect: blur particle - Google Search

Admit that it would be awesome!

Nope this is just incompatible as depth of field needs depth and particles as no depth value stored

Ok thanks for the clarification. No possibilities to maybe add those depth value on particles?

And same issue with the solid particle I guess?:

nope solid particles should work
We do not add particles to depth buffer because it is what we should do not because we do not want. This is how particles work

Indeed it works with solid particle:

So I guess if we want blur and particle we have to use solid particle! :wink:

1 Like