X Tutup
Skip to content

Use Viewport's 3D Scaling in the 3D editor's Half Resolution option#93436

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Calinou:3d-editor-half-resolution-use-3d-scaling
Nov 20, 2025
Merged

Use Viewport's 3D Scaling in the 3D editor's Half Resolution option#93436
Repiteo merged 1 commit intogodotengine:masterfrom
Calinou:3d-editor-half-resolution-use-3d-scaling

Conversation

@Calinou
Copy link
Member

@Calinou Calinou commented Jun 21, 2024

This removes the reliance on Viewport shrinking, which fixes various bugs with mouse input handling in 3D gizmos or the GridMap editor.

This also makes Half Resolution make use of the current 3D scaling mode defined in the project setting (bilinear, FSR1 or FSR2).

When Half Resolution is checked, the Scaling 3D Scale value in the project settings is halved in the editor. To ensure the 3D view remains somewhat readable, the final value can't go below the minimum value allowed in the project settings, which is 0.25.

Note that Half Resolution will now look different than it does previously, as it no longer uses nearest-neighbor filtering. For nearest-neighbor filtering to be reimplemented as an option, #79731 needs to be merged.

3D scaling is supported in all rendering methods since 4.3, so this should be safe to cherry-pick for 4.3.

@Calinou Calinou requested a review from a team June 21, 2024 16:37
@Calinou Calinou added this to the 4.3 milestone Jun 21, 2024
@clayjohn clayjohn modified the milestones: 4.3, 4.4 Jun 25, 2024
@Calinou Calinou added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 26, 2024
@Repiteo Repiteo added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@Calinou Calinou force-pushed the 3d-editor-half-resolution-use-3d-scaling branch from 42c737b to e34246e Compare April 17, 2025 14:29
@Calinou
Copy link
Member Author

Calinou commented Apr 17, 2025

Rebased and tested again, it works as expected.

Note that this does not fix #90843, so a dedicated solution is needed for that regardless (and can be merged independently).

@Calinou Calinou force-pushed the 3d-editor-half-resolution-use-3d-scaling branch from e34246e to abba75f Compare September 3, 2025 15:55
@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 5, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 5, 2025
@passivestar
Copy link
Contributor

Tested, works as expected and makes sense

Copy link
Contributor

@kitbdev kitbdev left a comment

Choose a reason for hiding this comment

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

I think this supersedes #33940

This doesn't remember the state properly on reload or when changing scene a couple of times. Node3DEditorViewport::get_state() should be updated to use the popup is_item_checked instead of get_stretch_shrink()

All uses of subviewport_container->get_stretch_shrink() in node_3d_editor_plugin.cpp can be removed, this was the only time it was set in the editor.

Otherwise works well, fixes all of the issues.

@Calinou Calinou force-pushed the 3d-editor-half-resolution-use-3d-scaling branch from abba75f to 1236d7b Compare November 18, 2025 22:26
@Calinou
Copy link
Member Author

Calinou commented Nov 18, 2025

Rebased and tested again, it works as expected.

I've also changed the viewport size in the View Information panel to take the Scaling 3D > Scale project setting into account, as well as the half-resolution toggle.

@Calinou Calinou force-pushed the 3d-editor-half-resolution-use-3d-scaling branch from 1236d7b to 0b66ec4 Compare November 18, 2025 22:29
This removes the reliance on Viewport shrinking, which fixes various
bugs with mouse input handling in 3D gizmos or the GridMap editor.

This also makes Half Resolution make use of the current 3D scaling
mode defined in the project setting (bilinear, FSR1 or FSR2).

When Half Resolution is checked, the Scaling 3D Scale value in the
project settings is halved in the editor. To ensure the 3D view
remaisn somewhat readable, the final value can't go below
the minimum value allowed in the project settings, which is 0.25.
@Calinou Calinou force-pushed the 3d-editor-half-resolution-use-3d-scaling branch from 0b66ec4 to 54a6e67 Compare November 18, 2025 22:30
@Repiteo Repiteo requested a review from kitbdev November 19, 2025 00:26
Copy link
Contributor

@kitbdev kitbdev left a comment

Choose a reason for hiding this comment

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

Looks good.

@Repiteo Repiteo merged commit 45ce9f0 into godotengine:master Nov 20, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 20, 2025

Thanks!

@akien-mga akien-mga removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Nov 27, 2025
@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

6 participants

X Tutup