I know you can download the last drawn frame from a
Viewport to main memory by using
Viewport.get_texture().get_data(). This will return an
Image object containing the pixel data.
Note that this is a very expensive operation, it can lag a bit if the resolution is too big.
Each Godot game runs under a main viewport representing the screen, which you can get with
You can render offscreen by putting your scene under a custom viewport, and making it render always (by default I think it won't render if not being made visible by a viewpot container node).
As for hooking up in the renderer itself, I don't know. Maybe there is another way involving modification of
If the destination of the frame is to be rendered using the same graphics card, I imagine there should be a better way than having to download the screen from it 60 times per second.