- Home /
how to see objects only through glass?
hi! I'd like to see an object only when viewed through a glass. I attach a picture to clarify what I would get.
I tried to work with layers and movie textures,but I think I have to use a shader. can anyone help?
thank you!
cattura.jpg
(54.2 kB)
Comment
Best Answer
Answer by Kiloblargh · Mar 03, 2014 at 05:26 PM
Sure- make the inverse shape of the glass region ( a very big plane with a hole in the middle) and apply the depth mask shader. This wouldn't work for a complex 3d shape but for a flat pane it will work just fine.
Your answer
![](https://koobas.hobune.stream/wayback/20220613135259im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Glass Shader with Strumpy Shader Editor 1 Answer
Stained glass material settings? 0 Answers
Frosted glass effect 0 Answers
Reflective/refractive 2D material, like static water. 0 Answers
Is it possible to create a glass shader in Unity Free? 1 Answer