Skip to content

Metal: Disable MetalFX Temporal for mobile rendering method #106731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

stuartcarnie
Copy link
Contributor

Closes #106665

It isn't supported, as mobile can't provide motion vectors. We can revisit once motion vector support is added via #100283.

@stuartcarnie stuartcarnie requested a review from a team as a code owner May 22, 2025 20:43
@Calinou Calinou added bug topic:rendering topic:3d cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels May 22, 2025
@Calinou
Copy link
Member

Calinou commented May 22, 2025

We can revisit once motion vector support is added via #100283.

Motion vectors added by that PR work differently from the ones in Forward+. They are rendered in a separate pass at a much lower resolution. They're intended to provide the data required for XR reprojection (asynchronous spacewarp) to work, rather than effects like TAA and motion blur.

It might be possible to make them render at the same resolution as the viewport resolution, but since it's a separate pass, this may end up slower than in Forward+ (due to the cost of setting up the pass). In Forward+, motion vector computations are already quite expensive: #61905

Comment on lines 975 to 977
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR && rendering_method != "forward_plus", "FSR1 is only available when using the Forward+ renderer.");
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2 && rendering_method != "forward_plus", "FSR2 is only available when using the Forward+ renderer.");
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL && rendering_method != "forward_plus", "MetalFX Temporal is only available when using the Forward+ renderer.");
Copy link
Member

@Calinou Calinou May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That reminds me, is MetalFX Spatial implemented in the Mobile renderer? I'm curious about it, since we don't have working FSR1 in Mobile right now. (We could probably add it, but FSR1 is rather demanding on mobile devices when it's not in tweaked form like godotengine/godot-proposals#3786 or godotengine/godot-proposals#10411.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apple's MetalFX are also optimised for their mobile devices, so they would still be usable there, but if the motion vectors are not viable for MetalFX Temporal upscaling, then we won't use it 👍🏻

@Calinou Calinou added this to the 4.5 milestone May 22, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

I can confirm MetalFX Spatial is available and fully functional on the Mobile rendering method, unlike FSR 1.0 which acts like Bilinear (or the previously selected 3D scaling mode, to be precise). So this PR is good as it is.

It isn't supported, as `mobile` can't provide motion vectors. We can
revisit once it is supported via godotengine#100283.
@stuartcarnie stuartcarnie force-pushed the metal_fx_temporal_no_mobile branch from 298b959 to fbe560a Compare May 23, 2025 20:48
@Repiteo Repiteo merged commit 50aa801 into godotengine:master May 26, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented May 26, 2025

Thanks!

@stuartcarnie stuartcarnie deleted the metal_fx_temporal_no_mobile branch May 26, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release topic:rendering topic:3d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MetalFX temporal + Dof + screenreading shader breaks
4 participants