godot icon indicating copy to clipboard operation
godot copied to clipboard

TAA is very slow on macOS

Open passivestar opened this issue 1 year ago • 6 comments

Tested versions

v4.3.dev6.official [89850d553]

System information

Godot v4.3.dev6 - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

Issue description

This is an empty project

TAA off: ~220fps TAA on: ~53fps

https://github.com/godotengine/godot/assets/60579014/fb9d21af-8e24-4af3-9a6d-6b016a2e8069

Steps to reproduce

N/A

Minimal reproduction project (MRP)

New empty project

passivestar avatar May 22 '24 13:05 passivestar

  • Related to https://github.com/godotengine/godot/issues/61905.

This seems much more extreme though, as a decrease from 220 FPS to 53 FPS means an increase in rendering time of 14.3 mspf.

Could you check if this happens with https://github.com/godotengine/godot/pull/88199 when the Metal driver is chosen in the project settings?

Also, what does performance with FSR2 at native resolution look like (in the Scaling 3D project settings)? You can leave TAA disabled in this case, as FSR2 comes with its own TAA algorithm.

Calinou avatar May 22 '24 15:05 Calinou

I've been having problems with this too (& thought it was already known/reported), enabling TAA in my game on M1 brings it from about 13mspf to 43mspf @ 1280x800. FSR2 also breaks the rendering severely (and runs badly, but the frame is broken - so no surprise), so I haven't been able to test it.

~~Waiting on #88199 to build right now, will update about it shortly.~~

update: using Metal backend fixes TAA performance for me, ~11ms/f TAA off -> ~14ms/f TAA on. editor looks a little funny, but my game looks correct other than some general issues in 4.3. FSR2 is also fixed (camera motion's a little weird, but that's for some other issue)

shakesoda avatar May 22 '24 18:05 shakesoda

Could you check if this happens with https://github.com/godotengine/godot/pull/88199 when the Metal driver is chosen in the project settings?

That does fix the issue for me too. Can you edit a "closes" keyword in there so that this gets closed when its merged? (also https://github.com/godotengine/godot/issues/88064)

Also, what does performance with FSR2 at native resolution look like (in the Scaling 3D project settings)? You can leave TAA disabled in this case, as FSR2 comes with its own TAA algorithm.

What's interesting about FSR2 on mac (both Vulkan and Metal) is that it's faster to run native resolution than 0.5 scale + FSR2, which I believe defeats the purpose of turning it on

https://github.com/godotengine/godot/assets/60579014/03173ddf-b8df-4412-bbc3-094c64396225

passivestar avatar May 23 '24 12:05 passivestar

What's interesting about FSR2 on mac (both Vulkan and Metal) is that it's faster to run native resolution than 0.5 scale + FSR2, which I believe defeats the purpose of turning it on

an empty scene is probably just not enough fragment shading work for fsr2's overhead to cost less than just rendering it does

shakesoda avatar May 23 '24 14:05 shakesoda

That does fix the issue for me too. Can you edit a "closes" keyword in there so that this gets closed when its merged? (also https://github.com/godotengine/godot/issues/88064)

I don't know if Metal will be made the default when it's merged, so I don't think that PR should close this issue just yet.

Calinou avatar May 23 '24 14:05 Calinou

I'd like to explore supporting MetalFX on Apple platforms too – as that has been highly optimised by Apple for upscaling and temporal anti-aliasing on their hardware.

stuartcarnie avatar Oct 02 '24 20:10 stuartcarnie

Note that MetalFX Temporal upscaling is now supported since 4.4 (it can also be used as native TAA, just like FSR2).

Metal is also the default rendering driver on macOS in 4.4, so TAA should perform well out of the box starting from 4.4 on Apple Silicon hardware. Vulkan is still used on non-Apple Silicon hardware due to missing support.

Calinou avatar Jan 16 '25 23:01 Calinou