Archiving a stencil buffer with Visual Effect/VFX graph

Hi

I’m trying to use a 3d object as a stencil/mask (with a stencil mask shader script in URP).
I can get this working with two 3d objects, say one is the mask the other is visible from the different perspectives.

I would like to now block/mask particles from the VFX in the Visual effect, I’ve had a look around and can’t find any advice/guidance on doing this.

Could I get some guidance to how I can do this ?

Thanks

2 Likes

Three years later, same problem. You didn’t happen to find a solution?
Theoretically, how you would achieve this is: make a shadergraph with the approriate stencil setting, then pipe this shadergraph into the output of your VFX graph.
Problem is: up to now, shadergraph does not support stencil buffers, and you can’t edit the generated code manually (well, you can but it doesn’t reflect in the VFX graph).

2 Likes

Working on a project where i’m aiming to do the same thing masking a vfx graph particle system with the stencil buffer. Did either of you find a solution?