- Edited
Hey,
I'm trying to use a shader to create a brush system. The shader would need the previous texture as a uniform sampler2D.
In Unity (without compute shaders...) I would use Graphics.Blit in order to achieve this. Any idea on how I can do this using Godot ? I'm trying to do this using viewport something like that:
Image img = parentViewport.GetTexture().GetData();
ImageTexture imgTex = new ImageTexture();
imgTex.CreateFromImage(img);
material.Set("shader_param/tex", imgTex);
But unfortunately I'm getting artifacts...
Ideally I would be able to apply the shader on the Sprite, blitt the result in another texture for setting the new "prev texture" for the next iteration.
Thank you in advance !