[SOLVED] Stencil buffer like in unity


I need some kind of this stuff:

I need to hide only one object behind invisible wall, but have a hole in it. Can i do it with some mesh, that writes only depths?

The closest thing I can think of is something like this:

We’ve used something similar in a 360 panorama project to occlude scene objects using invisible walls.

I’ll get it, our team just do some magic with layers.
Thanks for reply!

We had the same problem and we found a solution by creating custom Stencil Parameters and applying them to the Model/Sprite/Spine-Material. Give me a few minutes and I will set up an example project.

It is by no means perfect or finished, but it may serve as a good starting point.

1 Like


This is the example project. You can rotate the scene via Mouse, and you can see the various examples.
It also works for particle effects, which i forgot to mention in my previous post.

Have fun :wink:


Thank you !