How to access the screen texture inside a SubViewport?

Godot Version

4.4.1

Question

I am trying to implement a 2D multi-pass shader which is using the screen texture as an input via hint_screen_texture. The first pass of my shader is working fine until I move it inside a SubViewport. Then the screen texture is empty.

Am I missing something or is there another way of implementing a multi-pass shader using the screen texture as an input?

The subviewport is its own context, so you would need to duplicate anything you did for the main viewport. That is my inclanation at least…