Hello !
I’m facing a major problem and I’m having hard time finding a better way than what I did.
I’m working on a drawing application. I’m drawing with the “stamp” method. Basically I’m creating a vertice for each pixel between 2 points to create a line. This vertice is rendered as a gl_Point and a custom shader to add textures, color & effects. I’m also setting the opacity here of each point, this is creating an accumulation of opacity due to the high amount of overdraw. This is fine, it’s creating a flow :
https://www.ctrlpaint.com/videos/opacity-vs-flow
But I also needed to have a proper opacity. So I did the only solution I could think of : Rendering each stroke individually when finished on a plane (via a RenderTarget) and set the alpha of this plane. This is working nicely. But doing this had a huge performance impact when recreating the drawing (with stored data). I need to call a render for each stroke of the drawing…
Any ideas ?