[SOLVED] Window Transparent feature using Stencil

Hey, I am trying to implement window transparent feature by which user can view inside the house through a window by using Stencil Shader.

I took an example from following post.
[SOLVED] Stencil buffer like in unity:

The issue is complete wall gets transparent instead of just inner window. Here is a screenshot of the editor and launch:

I tried changing the condition for the function to EQUAL but it doesn’t seem to work.

and here is a function for a stencil in mask script

Here is a link to my project: https://playcanvas.com/editor/scene/1052715

It will be great if someone can help me with this.




Thanks @LeXXik for the help <3

1 Like