Struggling with paint trail effect in ShaderGraph. What am I doing wrong?

Link to what I have so far: Imgur: The magic of the Internet

Link to ShaderGraph for the original render texture: Imgur: The magic of the Internet
Link to ShaderGraph for the output render texture: Imgur: The magic of the Internet

I’m trying to make the quad on the right leave a trail of cyan when the circle moves. Both squares use different materials.

I’ve tried using Graphics.Blit to draw the current texture onto a new one but it doesn’t create any painting effect (code: hatebin).

The only progress I’ve gotten is from creating a RenderTexture and using SetPixel in a C# script (Imgur: The magic of the Internet) but its very inefficient and slows down my computer too much.

I’ve been going about this for weeks. What am I doing wrong? What are the other options I have?

Is this possible without shader code? I’ve tried learning shader code before and I’ve struggled with it. Hopefully there are easier alternatives.

Still no solution

What are the camera’s Clear Flags set to? If it’s set to Solid Color or Skybox anything you blit to the render texture in Update will be obliterated as soon as the camera starts to render.

What you need to do is draw your saved texture to the render texture after it does its clear. That means you either need to have a quad with your texture on it floating in view of the camera, or use a command buffer to do the blit during CameraEvent.BeforeForwardOpaque. You’ll also want to make sure you immediately clear the particles when you copy the render texture otherwise they’ll stack.

Or you need to set the clear flags to Nothing, though you’ll also likely need to change the shader being used by your particles to use Blend One One BlendOp Max as otherwise the visible particles will “fill in” any place that’s transparent to end up fully opaque after a few frames. If you go that route you also won’t ever need to copy render texture to a Texture2D unless you need it to survive level loads or game sessions. You can have particles render for a single frame and then get removed and they’ll stay in the render texture forever.