Experimental (PoC): screen-space view zoom#315
Draft
noctonca wants to merge 1 commit into
Draft
Conversation
A cheap, smooth view zoom that magnifies a centred sub-region of the finished frame when it is uploaded to the display (PresentFrame), leaving the render pipeline untouched. `zoom <factor>` / `zoom reset` in the console; ZOOM_ONE (1.0) is bit-identical to no zoom. This is the screen-space alternative to per-element projection scaling (#314): far simpler and gives smooth fractional zoom, but it upscales pixels (no extra detail, no shimmer fix) and zooms the whole frame including the UI. It does not deliver HD models; that is what #314's foundation is for. Kept as a separate experiment. Not visible in --screenshot captures, which save the pre-zoom Log buffer; the zoom only exists in the presented staging buffer, so it must be verified live.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Status: experimental PoC, Draft, not for merge. A cheap screen-space view zoom, kept as the simpler alternative to the per-element projection scaling in #314.
What it is
A
zoomconsole command that magnifies a centered sub-region of the finished frame when it is uploaded to the display (PresentFrame). The render pipeline is untouched; this is about 40 lines in the present path plus the command.ZOOM_ONE(1.0) is bit-identical to no zoom (gated to the original present loop), so the default path and the shipped game are unaffected.How it compares to #314
This is the "sample the buffer" approach. It is far simpler than #314 and gives smooth fractional zoom, but it upscales pixels: no extra model detail and no silhouette-shimmer fix, and it magnifies the whole frame including the UI. It does not deliver HD models; that is what #314's per-element foundation is for. The two are kept as separate, independent experiments.
Known limitations (inherent to screen-space)
Keeping the UI fixed would mean compositing it as a separate layer at native scale (or, for full-screen menus, simply forcing
zoom = 1.0while they are open). That UI-as-separate-layer step is also required by the HD/SSAA path, so it is shared work, not throwaway.Verification
The sampling math is verified offline (centered magnify, no out-of-bounds, fractional factors fine, 1.0 = full frame); build and format are clean. It is not visible in
--screenshotcaptures, which save the pre-zoomLogbuffer, so it was checked in the live window.