Thanks for the input.
Originally Posted by tonyo_au
Which will be the exact approach for that?
For smudging I would need to sample from the screen while dragging the mouse, and use a different texture along the path (it's like a special case of simple stamping, in which I only have the same brush texture). The rendering would be like this while dragging:
- Render the background quad with the texture I want to smudge
- For each point in the dragging path
- Render to a separate texture the surroundings of the last mouse location (this will be the stamp texture I would blend in the shader)
- Then render again to a texture, passing the shader both textures(the original, and the stamp), and the current mouse location. In the shader, if the current fragment is inside the box determined by the current mouse location (as center) and a given offset, apply the stamp texture (with the corresponding transformations), if not, apply the original. Do you think it could work?
Thanks in advance,