Stencil - see through effect

Hello, iam trying to make the see through effect similar to the one in the Divinity original sin 2.

So i created stencil and now i can see through the wall but from both direction if player is in front or behind

I tried to work with custom forward renderer it works right for any other material but the one with Stencil. I tried everything i could find on the internet. I dont have any experience with writing shaders so some tutorials were just to advanced for me to follow. PLease if there is some one who knows ho to make it. It would be fantastic.

Thank you.

Hi If your still looking for a solution check our Asset as this is custom made shader for this use case. It can handle multi user multi buildings ( obstructions ) and is available for Standard URP and HDRP .

https://forum.unity.com/threads/rel...isible-within-buildings-std-urp-hdrp.1182130/ https://assetstore.unity.com/packages/vfx/shaders/see-through-shader-193955

Greetings Toorican alt text