Blend last frame with the current one

Godot Version

Godot 4.3

Question

I’m trying to create a shader that blends the last frame with the current one to simulate the phosphor persistence of CRT screens. I’ve tried using get_viewport().get_texture().get_image() and passing this as a texture to the shader, but this is very slow.

Is there another way to do it without having to copy the framebuffer to the CPU and back to the GPU?