3d-retina-resolution
Render a 3D canvas sharply on Retina and HiDPI displays, including explicit 200 percent resolution, synchronized renderer and post-processing sizes, correct pointer coordinates, and measured quality fallbacks.
Install / Use
npx skills add MengTo/Skills --skill 3d-retina-resolutionInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
DesignSupported Platforms
Our assessment of 3d-retina-resolution
3d-retina-resolution scores 89/100 on our quality scale, 101st of 260 Design skills we index (top 39%).
Its SKILL.md is 6.1 KB long, split into 6 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 6,252 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so 3d-retina-resolution is actively maintained.
- Our last check on 2026-10-31 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-02. Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
3d-retina-resolution compared with similar skills
All 4 of these similar skills score higher than 3d-retina-resolution; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| 3d-retina-resolution (this skill)by MengTo | 89 | 6.3k | 54d ago | SKILL.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 149.0k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install 3d-retina-resolution?
- Run
npx skills add MengTo/Skills --skill 3d-retina-resolution. The install tabs above show the steps for each supported agent. - Which AI agents does 3d-retina-resolution work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is 3d-retina-resolution safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is 3d-retina-resolution still maintained?
- The repository was last updated about 2 months ago, so 3d-retina-resolution is actively maintained.
Skill content
View source on GitHubname: 3d-retina-resolution description: Render a 3D canvas sharply on Retina and HiDPI displays, including explicit 200 percent resolution, synchronized renderer and post-processing sizes, correct pointer coordinates, and measured quality fallbacks. Use for blurry WebGL output, 2x rendering, high-resolution previews, and display-density changes.
3D Retina Resolution
Treat an explicit 200% rendering request as two drawing-buffer pixels per CSS pixel in each dimension. A 1200 × 800 CSS canvas therefore uses a 2400 × 1600 drawing buffer, or four times the pixels of 100%. Layout and camera framing stay unchanged.
Choose the scale deliberately
- Fixed 200%: effective pixel ratio is
2, independent of device pixel ratio. This is the default when the user explicitly requests 200%. - Automatic Retina, capped at 2×: effective ratio is
Math.min(window.devicePixelRatio || 1, 2). This can render at 1× on an ordinary display; label it Auto rather than claiming it always renders at 200%. - Relative to native resolution: multiply native DPR only when the user explicitly wants that meaning. Native 2× multiplied by another 2 becomes 4× per dimension, or sixteen times the CSS pixel count.
Keep an explicit quality selection distinct from automatic adaptation. Inspect the project's renderer and post-processing architecture before changing sizing.
Synchronize the rendering pipeline
Use CSS to size the canvas and its container, then measure the container in CSS pixels. In Three.js WebGL, one consistent convention is logical sizes plus pixel ratio:
function resize3D(width, height, ratio = 2) {
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) return;
if (!Number.isFinite(ratio) || ratio <= 0) throw new RangeError('Invalid render ratio');
renderer.setPixelRatio(ratio);
renderer.setSize(width, height, false); // CSS owns displayed dimensions
camera.aspect = width / height; // perspective camera
camera.updateProjectionMatrix();
if (composer) {
composer.setPixelRatio(ratio);
composer.setSize(width, height); // logical pixels; do not multiply again
}
const physicalWidth = renderer.domElement.width;
const physicalHeight = renderer.domElement.height;
resizeCustomTargets(physicalWidth, physicalHeight);
}
The snippet assumes an existing renderer, perspective camera, optional composer (or null), and a resizeCustomTargets adapter supplied by the app. For an orthographic camera, update its bounds according to the existing framing policy instead of setting aspect.
The adapter updates only app-owned targets and uniforms; composer-managed passes already receive sizing through the composer. Set full-resolution depth/normal targets to physical dimensions. Size lower-resolution AO, bloom, or ray targets by their deliberate scale factors. Set sampling-resolution uniforms to the dimensions of the texture actually sampled, including reciprocal resolution where the shader expects it.
The renderer and composer each maintain their own pixel ratio. Updating only the canvas can leave a lower-resolution intermediate image stretched to a Retina output. Conversely, passing already doubled dimensions into a composer that also has DPR 2 allocates 4× dimensions. See the renderer and composer sizing APIs.
Handle layout and display changes
Observe the canvas container with ResizeObserver, coalesce notifications, and resize only when dimensions or effective ratio change. Skip zero-sized hidden views and retry when they become visible. Re-evaluate native DPR on browser zoom or display changes in Auto mode, including when CSS dimensions remain unchanged. Recreate a resolution media-query listener after each DPR change if using that approach.
Use canvas.getBoundingClientRect() for pointer normalization: (clientX - rect.left) / rect.width, and likewise for Y. Raycasting uses normalized coordinates derived from CSS space, not drawing-buffer pixels. Convert to physical pixels separately only for APIs such as a pixel readback.
Retina output does not automatically improve a blurry texture, coarse model, shadow map, or low-resolution reflection. Check those sources independently. Avoid CSS scaling or image-rendering: pixelated as a substitute for the correct drawing buffer. Higher resolution and antialiasing solve related but different artifacts.
Budget and fallback
Measure the scene at 1× and 2× with the same camera. Track frame time, target dimensions, allocation failures, and total passes. Check GPU limits before allocating exceptionally large targets, including maximum texture/renderbuffer dimensions and viewport limits.
Reduce optional post-effect resolution or samples before compromising a requested crisp main view. Auto mode may step down after sustained poor frame time and recover with hysteresis; do not resize every few frames. A fixed 200% selection should stay fixed unless a concrete hardware/allocation failure requires a visible fallback. Report the actual effective scale rather than displaying 200% while silently rendering lower.
Pause hidden views and render static scenes on demand. Under reduced motion, keep the sharp still image; reducing animation does not require reducing resolution. Dispose replaced render targets.
Verify
- At fixed 200%, compare canvas CSS size with
canvas.width/canvas.heightandrenderer.getDrawingBufferSize(); expect approximately 2× on each axis with integer rounding. - Confirm full-resolution composer buffers match and any reduced-size passes are intentional.
- Resize wide ↔ narrow, hide/show the view, and test browser zoom or display changes in Auto mode.
- Check thin edges and detailed materials at the same apparent size; pointer selection and UI alignment must remain correct.
- Test on a DPR 1 display and a Retina display: Fixed 200% remains 2×; Auto follows its cap.
Read REFERENCES.md for APIs and the reference project. Seijaku has several renderer quality caps and an adaptive main path; those values are context, not evidence that its main view already renders at fixed 200%.
Related Skills
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
149.0kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
