godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.96k stars 20.17k forks source link

FSR 2.2 jittering when viewing a ViewportTexture that spans the whole root Viewport with FSR on the root Viewport #85541

Open Wad67 opened 9 months ago

Wad67 commented 9 months ago

Godot version

4.2.stable.official [46dc27791]

System information

Godot v4.2.stable - Ubuntu 23.04 23.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (nvidia; 535.129.03) - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)

Issue description

FSR 2.2 when enabled creates an effect that can only be described as psychedelic and jittery I have also noticed that GPU particles leave behind trails of stray pixels with it enabled.

Video example from my game: (The jittering is visible at all times, you can see the peculiar trail at around 0:37 for one example)

https://github.com/godotengine/godot/assets/991507/a9a68f59-b8bc-40e2-81b0-5712a63b8f65

Video example from included minimal demo (editor view) :

https://github.com/godotengine/godot/assets/991507/f892c48a-44eb-43ec-9b3f-f40d740a9f91

It seems to be related to the apparent load of the GPU, but that is just conjecture. I have no idea what is going on. There is ghosting that appears at random as well.

Steps to reproduce

Enable FSR 2.2 Witness insanity

Minimal reproduction project

FSR_Bug.zip

Calinou commented 9 months ago

If you're rendering large planes of ViewportTextures in front of the screen, disable FSR2 on your root viewport and enable it on the Viewport that renders to the ViewportTexture instead.

FSR2 cannot "see" textures that are updated in real-time (such as ViewportTextures), so ghosting is expected on those if they update quickly.

Wad67 commented 9 months ago

If you're rendering large planes of ViewportTextures in front of the screen, disable FSR2 on your root viewport and enable it on the Viewport that renders to the ViewportTexture instead.

FSR2 cannot "see" textures that are updated in real-time (such as ViewportTextures), so ghosting is expected on those if they update quickly.

Okay, that makes sense. I should note that the global project setting enables FSR2 in the default view and any viewports (and thus viewport textures). There should probably be a warning for this, however I have noted that there is still a perceptible jitter in ViewportTextures mapped to a quad, I will continue to investigate.