- Home /
[2D]X-Ray Sprites
In the game I'm making I have all my sprites layered from the background, then the wall, the floor and stairs. But I want to put a windowsill sprite on the stair layer but I want it to see through the wall sprites to the background sprite. Is there anyway to have a maybe separate sprite or the same sprite with a shader that sees through different sprites.
I think a stencil buffer might be what you're looking for: http://forum.unity3d.com/threads/is-it-possible-to-clip-a-sprite-with-another-sprite.254144/
Ins$$anonymous$$d of using the Equal
comparison function, you can use the NotEqual
comparison function ins$$anonymous$$d.
I'm not sure if it's because I did something wrong or it doesn't work or that's not what I wanted but the problem is the there is a wall in between the window and the background. It's just not working
Your answer
Follow this Question
Related Questions
Particles not rendering on sorting layer specified with sprite-default shader 0 Answers
Make Sprite-Diffuse shader work on mesh renderer? 0 Answers
Sprite not visible from behind 0 Answers
Sprites consisting of two packed textures 0 Answers
Camera layering : UI shader is cleared by second camera with Depth Only flag 1 Answer