How to collide with transparent object in VFX Graph

Hello,

I want my particle to collide with depth buffer and transparent objects. I tried to “Depth Write” in the standard transparent shader but it’s not working.

Is it possible ?
Do you have any idea how to achieve this ?

I’m in unity 2023

Thanks.

I think URP resolves the depth buffer texture after the Opaque pass.

This means that, even if you are writing depth in your transparent pass, the texture will not be updated with it.

I’m not sure what would be the best workaround (it depends a lot on your specific scenario).

For instance you could try Opaque with dithering, specially if you are using TAA.

If you add more details maybe we can find a better solution.

I’m actually in HDRP.

I’m not very a specialist in rendering programing.

My app is mainly made of vfx graph objects. I want to collide with objects in the scene, I want those objects to be either transparent or opaque.

I was thinking of having 2 cameras for the same point of view. With tag, i can feed the depth image to the vfx graph and hide objects with the other camera.
But I think there could be a better solution.

I don’t use TAA (with particles it’s not working very well).

What do you mean by Opaque with dithering ?

All my rendering can be seen here : https://www.instagram.com/gamgie_/
It gives you un extract of what kind of scene I’m talking about.