help me (solved) X-Ray Progress
Hello again,
Here's my current attempt using a BackBufferCopy
and a Mask in the scene tree:
- Player
BackBufferCopy
- Walls
- Mask with simple shader which samples the
hint_screen_texture
created by theBackBufferCopy
Works okay, but I will continue experimenting - Thanks everyone for the input in the last post!
2
u/ParrotGenie2 1d ago
I saw the first post as well. I think it would look better with out the black circle, especially on the non wall parts.
1
u/EZPZLemonWheezy 1d ago
If you don’t need to see all the background detail, and just the silhouette, you could just detect when the character sprite is obscured and overlay a copy with a shader to make it an outline and just plop it on a closer Z-layer than the walls. Maybe I’m off base here, but it seems simpler to detect overlap and then just toss the copy silhouette out than try and deal with Backbuffer. Unless that cutout effect is the desired end goal and not just showing where the character is when obscured.
1
u/m1lk1way 1d ago
i’d make it semi-transparent, also circle goes out of wall bounds and looks a bit strange there
2
u/gamruls 2d ago
Check how it works with built in lights (if you need them). Last time I used backbuffer copy it ignored light pass (I hope there is workaround for it too, but not sure)