I have two simple translucent circle sprites that I'm using as fake shadows (shown below) under some characters (not shown below). When the characters get close enough, sometimes their shadow circles can overlap - which is fine - but thanks to the default blending it doesn't look right. I want the shadow circles that do overlap to be visually merged/mixed so they maintain the same opacity, but instead they add together where they overlap like this: I have to imagine there's some way to make this work with a shader, but I'm so bad at shaders that I can't seem to figure it out. Does anyone know how to solve this?
Asked
Active
Viewed 424 times
2

Sean Heber
- 98
- 6
-
1i dont think theres any way to achieve this without a shader – hamobi Aug 31 '22 at 18:21
-
@hamobi I'm not asking to do it without a shader - in fact I suggested in the question that it might require a shader. :p – Sean Heber Sep 01 '22 at 22:49
-
If you are using Godot 4, there is a newly added CanvasGroup node for applying effects (such as transparency using the Self Modulate property) to multiple nodes as a whole. https://godotengine.org/article/godots-2d-engine-gets-several-improvements-upcoming-40 However, I'm not sure if this would work for nodes from different parents. – RJ-Adam Sep 06 '22 at 23:50
-
Yeah I saw that in Godot 4 - it looks like it eliminates the need for any shaders to do this, probably, but it's not an automatic solution because of the layering. I'd still need something to probably sync/re-parent the shadow into some background shadow layer or something like that to get it to work - not insurmountable, but not very obvious either. I haven't run across any better ideas, though. – Sean Heber Sep 07 '22 at 15:51