Godot Version
Godot Engine v4.4.stable.mono.official [4c311cbee]
Question
I’m trying to put together a declarative 2D rendering system that operates solely on primitives. I can specify the draws I want in the editor, and the corresponding DrawXxx
call is executed inside of the Node. This works very well for convex objects, but I want the ability to create concave objects. The example here is for logic gates. I have an AND gates that is composed of a circle and a rectangle:
For the OR gate, I want to make the “butt” of the gate concave. The current setup I have is something like this: First I add a large circle:
Then I set the large circle to match the background:
This gives the exact look I’m going for. However, this large circle still exists, and if I’m not careful then it can start overlapping with other objects in my scene:
Is there a way to properly create a subtractive draw? I’ve tried used shaders to make the large circle transparent, but it appears shaders are applied to each individual draw call, rather than the completed result. The results in the large circle just not appearing, rather than subtracting how I’d like.
Any advice?