- Edited
I'd like to create a painting program where the user can click and drag with the mouse to lay down a stroke of paint. Basically, I have one texture representing the head of my brush and as the user drags the mouse across the canvas, for each InputEventMouseMotion event I draw an instance of this brush head texture onto another texture I'm using as a buffer for the entire stroke.
I'm trying to figure out how to do this using Godot's architecture. I don't want to simply create a whole lot of Sprite nodes and place them on my canvas - I want this all composited into a single texture. I'd also like to use a shader when I draw the brush head so I have control over opacity, rotation, scale and could even try advanced blending equations such as overlay, screen, dodge, burn, etc.
Is there a way to directly composite into a single texture or viewport? As far as I can tell, the only way to render images on top of one another is by setting up a node hierarchy and letting Godot's rendering system do the work.