Skip to content

Commit 298b959

Browse files
committed
Metal: Disable MetalFX Temporal for mobile rendering method
It isn't supported, as `mobile` can't provide motion vectors. We can revisit once it is supported via #100283.
1 parent 7a0ab9d commit 298b959

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

servers/rendering/renderer_viewport.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,10 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
971971
void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) {
972972
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
973973
ERR_FAIL_NULL(viewport);
974-
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR && OS::get_singleton()->get_current_rendering_method() != "forward_plus", "FSR1 is only available when using the Forward+ renderer.");
975-
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2 && OS::get_singleton()->get_current_rendering_method() != "forward_plus", "FSR2 is only available when using the Forward+ renderer.");
974+
const String rendering_method = OS::get_singleton()->get_current_rendering_method();
975+
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.");
976+
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.");
977+
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.");
976978

977979
if (viewport->scaling_3d_mode == p_mode) {
978980
return;

0 commit comments

Comments
 (0)