Hello everybody!
It's my first post, I hope I'm not making any mistake! 🤞
I searched for a while in this forum channel without finding anything about this.
I don't like to feel helpless and having to bother people like this, I always do my best to solve problems on my own, but I've been searching for days without finding a solution, so here I am. 😅
I followed a tutorial from Brackeys (and others, with the same approach) to make a glow effect on some tiles in my 2D world with shadergraph. The effect is looking very good, I just adjusted the settings a little to suit my needs. However, if everything looks good at first glance, something's wrong when two glowing objects overlap: the overlapping areas go black.
I understand the why, as it is making the objects transparent and the transparency adds up in the overlapping areas. But I'd like to find a way to prevent this.
I attached screenshots to illustrate my point. In the first, it's the raw lava, without any shader. Then, it's the glowing effect of the shader, with spaced tiles. The third image illustrates the issue I'm talking about, with overlapped tiles. Finally, the last is the best (kind of...) thing I could get by tweaking stencil and depth buffers settings. However, it seems more like the opposite of what I need, as it renders the farthest tiles first and doesn't render the overlapping parts of the one a bit closer.
I hope there is a solution to this, because it looks so much better with this effect, but if not, well, I'll have to give up on this. 🥲
Thank you very much in advance for your help!