Skip to content

[Feature]: Cap stage WebGL DPR + low-power preference #48

Description

@rosspeili

One-line summary

Limit the main avatar <Canvas> device pixel ratio (and prefer low-power GPU) so the overlay does not run a full HiDPI framebuffer on 150–200% Windows scaling.

Problem / motivation

Appearance picker WebGL cost was fixed by static thumbs (#10 / #20). The stage Canvas still uses antialias: true with no dpr cap, so on common Windows DPI settings the WebGL backing store is much larger than the companion needs. That burns GPU fill-rate and thermals more than it helps the ~1 GB RAM floor.

Follow-up called out on #10 after the picker work shipped — tracking separately so #10 can close.

Proposed solution

In AvatarStage.jsx (R3F <Canvas>):

  • Cap DPR, e.g. dpr={[1, 1.5]} or dpr={1} (pick after a quick visual check on 100% / 150% / 200% scaling).
  • Set gl={{ alpha: true, antialias: true, powerPreference: 'low-power' }} (keep transparency; tune antialias only if quality/cost trade-off wants it).
  • Smoke on dev:desktop / installer: avatar still crisp enough for an overlay; blink / VRMA / lip sync unchanged.
  • Short changelog note if the change is user-visible on high-DPI machines (optional docs line only if we document GPU tips later).

Alternatives considered

Approach Why not
Keep #10 open for this Title/scope still “dual-canvas pickers”; picker work is done
frameloop="demand" Breaks idle blink + continuous VRMA without more redesign
Kill antialias entirely first Bigger visual hit; try DPR cap first

Primary surface

Appearance (avatars / environments)

Constraints you accept

  • Should stay usable offline / local-first
  • Browser-only mode may remain limited vs Electron

Mock / sketch / reference (optional)

No UI chrome change — same stage, softer GPU load on HiDPI. Related: #10 (close), #20 (static thumbs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:appearanceAvatars, drop-in VRM naming, custom foldersfeatureNew feature or improvement requeststack:vrmVRM / VRMA loaders, three-vrm, expressions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions