Mixing colours from circles when they overlap

Hi, I’m new to Godot, and I’m making my first game project.

I’m trying to make or find a shader that mixes the colour of two circles when they overlap, like this:

example_Game

I’m creating the circles using a “draw_circle”:

image

image

How can I make this colour blend of two circles using a shader? Is there any easier way to do this?

I’m new and I have no idea how this works, so any help is welcomed.

Thanks!

If they are sprites you can set the material to a new CanvasMaterial with blend mode “Add”

1 Like

Ok, thanks so much for answering so quickly!

For my game, I want the player to mix primary colors, so I have been experimenting with the Canvas Material and the blend mode “add” with primary colors.

it works with the additive primary colours (Red, Green and Blue):

However, it doesn’t work that well with Subtractive primary colors (Cyan, Magenta, and Yellow) because the mix it’s always white,
but it works better with the “multiply” blend mode.

Probably this is something obvious xd, anyway I’m going to experiment further with the material and sprites.

Thanks a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.