Skip to content

Commit

Permalink
Add warning when use FSR1 on renderer other than forward plus
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Jul 18, 2024
1 parent 383a6e4 commit 46ed290
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions servers/rendering/renderer_viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) {
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_NULL(viewport);
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.");
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.");

if (viewport->scaling_3d_mode == p_mode) {
Expand Down

0 comments on commit 46ed290

Please sign in to comment.