Repository navigation
Simulator: supersampled render scale for high-res captures - #106
Merged
Merged
Conversation
PLXNATIVE_RENDER_SCALE=<1..4> (hostsim only) renders each frame into an offscreen N*1920 x N*1080 framebuffer, shown downscaled in the window, so a shot is a true Nx render regardless of the display size. Every return to the screen binds surface::default_fb() instead of a literal 0 (a constant 0 on the television). To keep the result crisp rather than an upscale: - text rasterises a second glyph texture at N*sz and draws it at 1/N, while layout keeps measuring the logical texture; font slots and the glyph cache grow in hostsim builds - gfx::snap snaps to whole physical pixels; icon masks rasterise at Nx - poster/backdrop requests ask PMS for Nx pixels; the decode limits and the texture/render byte ceilings scale by N^2 - the backdrop blur renders its source at the same authored resolution as a television (divisor 4N) and widens capture-path taps by N, so the glass matches a 1x frame (mean abs diff ~1/255 over the tab track) - the coverage AA ramp smoothstep(-1,1,d) is narrowed to one physical pixel by a hostsim-only rewrite at shader compile; TV shader sources untouched - pointer events map through the window, not the offscreen viewport - the dev FPS counter is not drawn into a supersampled frame - PLXNATIVE_SHOT_ALPHA=1 writes the premultiplied RGBA framebuffer Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01BjPget8zRrfPT7i1f11bEt
There was a problem hiding this comment.
🟡 Changes recommended
Supersampled blur, memory accounting, decode limits, and live capture behavior contain unresolved correctness or resource-management issues.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds hostsim-only supersampled rendering for high-resolution screenshots while preserving logical 1920×1080 layout.
Changes:
- Adds offscreen framebuffer rendering, pointer mapping, and downscaled presentation.
- Scales text, icons, artwork requests, blur parameters, and memory limits.
- Adds optional premultiplied RGBA screenshot output.
File summaries
| File | Description |
|---|---|
rust-modules/src/surface.rs |
Supersampled framebuffer and coordinate mapping |
rust-modules/src/gfx.rs |
Scaling, blur, and framebuffer integration |
rust-modules/src/text.rs |
High-resolution text textures and caches |
rust-modules/src/ui/icons.rs |
Scaled icon rasterization |
rust-modules/src/ui/tex.rs |
Scaled texture budget |
rust-modules/src/ui/frame/render_set.rs |
Scaled render budget |
rust-modules/src/img.rs |
Supersampled decode limits |
rust-modules/src/shot.rs |
Optional RGBA screenshots |
rust-modules/src/app/run.rs |
Presentation and FPS-counter integration |
rust-modules/src/app/adapters/poster.rs |
Scaled PMS image requests |
Makefile |
Simulator usage documentation |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // look at quarter resolution have to shrink in proportion at any finer divisor. Without | ||
| // this a scale sweep changes two variables at once and measures neither. | ||
| let tap_k = 4.0 / scale as f32; | ||
| let tap_k = 4.0 * crate::surface::render_scale() as f32 / scale as f32; |
Comment on lines
+63
to
+66
| if crate::surface::render_scale() > 1 { | ||
| l.max_image_width = Some(16384); | ||
| l.max_image_height = Some(16384); | ||
| l.max_alloc = Some(512 * 1024 * 1024); |
| a.store(v, Ordering::Relaxed); | ||
| } | ||
| WIN_SCALE_BITS.store(scale().to_bits(), Ordering::Relaxed); | ||
| SS_FBO.store(f, Ordering::Relaxed); |
| } | ||
| let total = self.total_bytes(); | ||
| if total > RENDER_BYTES_MAX { | ||
| if total > RENDER_BYTES_MAX * crate::ui::tex::render_area() { |
GLinnik21
added a commit
that referenced
this pull request
Sep 17, 2026
Brings in #106 (supersampled simulator render scale) and the rewritten beginner install guide. The one conflict, docs/install-and-verify.md, keeps main's new guide and carries this branch's sandbox/ACG paragraph (the storage helper's database.operation and securitykey.operation) under the rooted-vs-Developer-Mode section. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3rkPgGB7xpjGgcPbfakaF
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.
PLXNATIVE_RENDER_SCALE=<1..4> (hostsim only) renders each frame into an offscreen N×1920 × N×1080 framebuffer, shown downscaled in the window, so a screenshot is a true N× render regardless of display size. Used for the 5760×3240 masters behind the landing page's glass close-up.
TV builds: every return to the screen binds surface::default_fb(), which is a constant 0 on the television.
Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01BjPget8zRrfPT7i1f11bEt