I'm a little confused with how Godot handles blending. I'm trying to get an inverted effect with this text, where it's white where the meter background is black and vice versa.

I assumed that all I'd need to do was apply a CanvasItemMaterial with one of the blend modes to the text but no dice. Anyone else got any experience with this?

That is subtracting, if you subtract 0 from 0 you still have zero (black). You should be able to do this with a shader, but that might be overkill for this effect. Maybe it would work with 2 text layer with the same text but one is add and the other subtract?

If you need help with how to make a shader like this, let me know and I'll see if I can quickly make a shader that should achieve the desired effect.

@Kayomn said: So I imagine this shader effect will need to be a canvas shader that runs after everything before this text is rendered, so I'll need to get the current screen texture.

https://docs.godotengine.org/en/stable/tutorials/shading/screen-reading_shaders.html

I imagine this is what I'll want to look at?

As for the effect, I'll check the background pixel at the position of the text and flip it right?

Yup! That is what I would suggest looking at, and that is the direction I would suggest looking into when making the shader.

For anyone else who comes across this and wants to know how the effect works.

2 years later