Skip to content

Experimental (PoC): screen-space view zoom#315

Draft
noctonca wants to merge 1 commit into
mainfrom
feat/iso-zoom-screenspace
Draft

Experimental (PoC): screen-space view zoom#315
noctonca wants to merge 1 commit into
mainfrom
feat/iso-zoom-screenspace

Conversation

@noctonca

@noctonca noctonca commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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 zoom console 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 2       # magnify 2x
zoom 1.5
zoom reset   # back to 1.0
zoom         # print current

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)

  • Pixels are nearest-neighbour upscaled (blocky).
  • The whole frame zooms, including the UI/HUD and menus.
  • Centered on the framebuffer centre, not the hero (the iso follow keeps the hero roughly centred, so it reads fine in practice).

Keeping the UI fixed would mean compositing it as a separate layer at native scale (or, for full-screen menus, simply forcing zoom = 1.0 while 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 --screenshot captures, which save the pre-zoom Log buffer, so it was checked in the live window.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant