Godot 4.4 Shaders

Godot Version

4.4

Question

Hello everyone, I am REALLY new to shaders, and i wanted to know how to draw on a sprite using another sprite maybe through a mask or something, mostly using a circle to turn the sprite that is behind that circle either transparent or some other type of color, hopefully i can choose the color myself. i dont know if i explained it well so im gonna abriviate. 2 sprites with 1 having a shader, 1 sprite needs to be a sphere and it needs to change the color of the pixels of the sprite behind it, hopefully fully customizable. Thank you everyone and have a nice day.

You’ll probably need more than just shaders to do that. Shaders can do a lot of things, but the way they’re usually used is when drawing individual polygons.

I think you may have better luck if you describe (in detail) what you want to achieve without making assumptions about the method used.

It seems like what you want is to use an image or a shape or something to draw on another object or surface. So, say, to take the example from the GIMP image editor, you can choose any of a number of “paint brushes”, including on that looks like a green pepper, and scribble peppers all over your image.

Rather than doing that in a shader, I think what you probably want is a texture you can write to.

1 Like

Hey man, im 100% i want it in a shader because i want to later turn the color i already changed the sprite to into either another color or create a certain burning effect. So literally all i want is to be able to change the color of the sprite below compared to the sphere above( meaning the pixels that touch the sphere change color) thats genuinely it. Thank you, if u have more questions plz ask

Great resource to start with:

1 Like

just give the circle a transparent shader that modfies the pixels its on.