Help With Overlap Painting

Hi, I’m looking for a specific shader in Unity that would allow me to paint on a plane during runtime, similar to painting on a canvas.

Here’s the behavior I’m aiming for:

  • I have three colors in the palette: the default color (the base color of the plane), and two brush colors (blue and yellow).

  • When I paint over an area that has already been painted, the spot will change to the new color, but the previous color will remain active, so I can continue painting with it elsewhere. In other words, if I paint the same spot twice, the spot’s color will update to the new one, while the previous color is still available for further painting.

Previously, I attempted to paint using meshes (connecting triangles to form the brush shape), but I couldn’t figure out how to update the color when painting over the same area.

If anyone knows of an asset or a method to achieve this effect, please let me know. I’d really appreciate any help!

Hi @Jimeral,
I believe Custom Render Texture is what you’re looking for. There’s an example on the doc page that should help.
You need to make your Custom Render Texture “double buffered” and use the Custom Render Texture Self node.

1 Like

Thank you very much! I’ll study it.