|
@@ -145,6 +145,12 @@ void RendererViewport::_configure_3d_render_buffers(Viewport *p_viewport) {
|
|
|
scaling_3d_mode = RS::VIEWPORT_SCALING_3D_MODE_OFF;
|
|
|
}
|
|
|
|
|
|
+ if (scaling_3d_mode != RS::VIEWPORT_SCALING_3D_MODE_OFF && scaling_3d_mode != RS::VIEWPORT_SCALING_3D_MODE_BILINEAR && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
|
|
+ scaling_3d_mode = RS::VIEWPORT_SCALING_3D_MODE_BILINEAR;
|
|
|
+ scaling_type = RS::scaling_3d_mode_type(scaling_3d_mode);
|
|
|
+ WARN_PRINT_ONCE("MetalFX and FSR upscaling are not supported in the Compatibility renderer. Falling back to bilinear scaling.");
|
|
|
+ }
|
|
|
+
|
|
|
if (scaling_3d_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL && !RD::get_singleton()->has_feature(RD::SUPPORTS_METALFX_TEMPORAL)) {
|
|
|
if (RD::get_singleton()->has_feature(RD::SUPPORTS_METALFX_SPATIAL)) {
|
|
|
// Prefer MetalFX spatial if it is supported, which will be much more efficient than FSR2,
|
|
@@ -974,6 +980,9 @@ void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::Viewport
|
|
|
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2, "FSR2 is only available when using the Forward+ renderer.");
|
|
|
ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL, "MetalFX Temporal is only available when using the Forward+ renderer.");
|
|
|
}
|
|
|
+ if (rendering_method == "gl_compatibility") {
|
|
|
+ ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL, "MetalFX Spatial is only available when using the Forward+ and Mobile renderers.");
|
|
|
+ }
|
|
|
|
|
|
if (viewport->scaling_3d_mode == p_mode) {
|
|
|
return;
|