godotengine / godot

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

TAA Bad Quality #81709

Open mahdisml opened 1 year ago

mahdisml commented 1 year ago

Godot version

4.1.1 Stable

System information

Windows 11- 4.1.1 Stable - intel 6200U nvidia 940M - Vulkan Forward +

Issue description

I don't know why, but I couldn't get good results from TAA like other engines (unreal and unity) The movement completely destroys TAA !

If I only use TAA (not using MSAA as an aid) the anti-aliasing disappears completely during camera movement. This picture was taken while I was moving the camera, you can clearly see that anti-aliasing is not working well. (Even if we enable MSAA, the decrease in anti-aliasing quality is visible in motions)

image

Steps to reproduce

image

Minimal reproduction project

https://github.com/LegionGames/FirstPersonController

AThousandShips commented 1 year ago

Have you read this? It describes some of the trade-offs and pros and cons.

mahdisml commented 1 year ago

Have you read this?

Of course yes

It describes some of the trade-offs and pros and cons.

I know, but this seems more like a problem than the function itself

There are also no TAA quality control settings

bitsawer commented 1 year ago

There is currenly work-in-progress suport for FidelityFX Super Resolution 2.2, which should provide a better quality anti-aliasing alternative https://github.com/godotengine/godot/pull/81197 at the cost of some performance.

Calinou commented 1 year ago

The screenshot in OP looks pretty expected for TAA in motion. I wouldn't say the antialiasing is completely destroyed in your example. Remember that TAA implementation quality varies across engines, as some engines will favor better antialiasing at the cost of a more blurry image (or an algorithm that takes up more GPU time).

If you want to favor quality over performance, use FSR2 at native resolution once it's supported.

If you can't afford FSR2 at native resolution, enable FXAA at the same time as TAA. This will make for a blurry image though.

PS: Remember that TAA quality in motion is a direct factor of the rendering framerate. The higher the FPS, the faster TAA will be able to converge. For good results, you need a steady 60 FPS (preferably more).

mrjustaguy commented 1 year ago

Um, no, OP has a point, our TAA implementation is actually broken, and not just in a handful of ways. 1) Transparent geometry breaks TAA completely 2) Image looks ok while static but the moment you start moving it turns into a super blurry mess with parts of the image suffering from extreme Pixelization (around Aliasing) 3) Ghosting galore 4) Is more expensive than it should be 5) Has multiple instances where it fails to successfully perform Antialiasing to any good standard (MSAA helps a ton there though, FXAA only a little)

FXAA doesn't help one bit with these issues, and TAA is currently unusable even at 144 FPS.

The only options are to not use it or to use FSR2 once it comes (or by running the FSR2 PR build) While FSR2 is 2x as expensive native, it solves all the issues above (4 too if you're gonna be upscaling you know..)

clayjohn commented 10 months ago

To support FSR2.2 we fixed a bunch of issues with our native TAA. It would be worth revisiting this when 4.2 releases to see if the above evaluations are still true.

mrjustaguy commented 10 months ago

All 5 points are still active in Native TAA

FSR2 fixes 1, 2 and 5. 4 isn't as it's more expensive, though really that seems to be as designed, due to the focus on Upscaling. Unclear how FSR3 Native AA may change it if at all. It's a mixed bag for 3, as it's good regarding Regular Ghosting, but suffers from Super Ghosting (due to FSR 2 Pixel Locking mechanism, that get's worse if you use non-native res)