Godot Version
4.2.2
Question
I want to combine pixel graphics with HD elements so I took the approach of making a SubViewport with target resolution for pixel art (160, 90) and then viewing it as ViewportTexture (1920, 1080). It would work correctly, but I have a shader that allows better sprite rotation for pixel art sprites. The shader first upscales the sprite, so then when it’s downscaled back to target resolution it smoothes the rotated pixels. This is how the shader worked before I started using the SubViewport and simply had project resolution set to (160, 90):
So now here’s how it looks with HD UI:
The sprites are inside a (160, 90) SubViewport, the project resolution is (1920, 1080)
As you can see the shader is not working correctly, because it was dependent on downscaling back to (160, 90).
My question is: is there a way to apply the shader before the SubViewport is upscaled or maybe a different approach that would work? I’ve hear of BackBufferCopy, but I don’t understand how to use that.

