Allow any floating-point value as a 3D rendering scale option #52215
+43
−103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #51870.
This allows for finer control over 3D rendering resolution. Supersampling can also be performed by setting a 3D rendering resolution above 1.0, which is useful for offline rendering or for very high-end GPUs.
With this change, it's possible to implement dynamic resolution scaling using a script. It's not ideal but seems to be usable enough, provided you disable temporal reprojection in volumetric fog (if you use volumetric fog). The sky will also flicker black when the render scale is changed for one frame, but we can figure that out in a later PR.
Testing project: test_render_scale.zip
Use ZQSD/Space/Shift to move, mouse wheel up/down or F2/F1 to change the rendering scale. Press X to toggle the experimental dynamic resolution scaling (it targets ~200 FPS with the frametime variables, modify
Label.gd
to change this).I haven't submitted this in the PR, but it appears that anamorphic resolution scaling (different factors for width and height) works fine with the above testing project. If desired, I can amend this pull request or open a new one after this PR is merged.