Skip to content

Supersampling resolve filters + optional RCAS sharpening - #105

Merged
Zolo101 merged 1 commit into
Zolo101:stonecutterfrom
PEQHUB:feat/supersampling-filters
Sep 20, 2026
Merged

Zolo101 merged 1 commit into
Zolo101:stonecutterfrom
PEQHUB:feat/supersampling-filters

Conversation

@PEQHUB

@PEQHUB PEQHUB commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Supersampling resolve filters + optional RCAS sharpening

Base: Zolo101/RenderScale @ stonecutter · Head: PEQHUB:feat/supersampling-filters · Commit: 6b888b9

What it does

When the render scale is above 100%, the downscale from the render target to the window currently uses a single bilinear fetch. This adds two resolve filters, selectable in the config:

  • Rotated Grid — 4 taps on the classic rotated grid. Best around 2x.
  • Sparse Grid — 8 taps as two half-scale rotated-grid quads. Used at 3x and above; falls back to Rotated Grid below that.

Both filter the already-rendered image; they do not add geometry coverage samples. Below 100% scale, nothing changes.

Optional RCAS sharpening (Off / RCAS / RCAS with noise protection) offsets the resolve softening. It runs at AMD's FSR1 reference tuning over the shared output-sized intermediate, blending towards the unsharpened pixel so strength is a plain 0-100% control. Default 35%. 0% or Off skips the pass entirely. The FSR path is never sharpened.

Implementation notes

  • New branch in blitAndBlendToTexture for render-target-larger-than-output; mutually exclusive with FSR upscaling by construction.
  • No supported version exposes a float uniform setter on a render pass, so strength is a shader define over a lazily built preset cache (21 presets x 2 noise modes). Stored strength is normalized to the same 5% presets on load, save, and slider input.
  • One rcas.fsh serves FSR and sharpening; the blend/noise defines are optional, so FSR's output is unchanged. Version-specific pipeline building is one RenderPipeline.Builder factory; the fullscreen pass and intermediate-target handling are shared helpers.
  • Controls are on the main page in both the Cloth and Sodium UIs, guarded to 1.21.11+ like the fsr option. Older versions are untouched (slider ranges revert to 200%).
  • Dev-only gametest classes are excluded from the shipped jars.

Testing

  • Builds on 1.21.11-fabric, 26.2-fabric, 26.2-neoforge, 26.3-fabric.
  • Filter math was verified against a box reference and a CPU RCAS port anchored to GPU-measured values during development (harness kept out of the repo).
  • In-game on 26.2-fabric, 149-mod pack, RTX 5090: clean load/exit, RGSS at 200% and SGSS at 400% visually confirmed.

Known limitations

  • The 300% filter switch is a hard threshold; quality jump around 300% needs playtesting.
  • Iris verified with shader packs disabled only.
  • SGSS is not perfectly isotropic on reflected diagonals (noted in the shader).
  • Driver-style rasterizer SGSSAA isn't possible through the current API; these are resolve-side filters.

…S sharpening)

Adds a downscale-filter option for scales above 100%: Rotated Grid (4
bilinear taps on the arctan(1/2) grid, best around 2x) and Sparse Grid
(8 taps as two half-scale rotated-grid quads, used at 3x and above).
Both resolve the already-rendered ordered-grid image; no extra geometry
coverage samples. Below 100% the behaviour is unchanged.

An optional RCAS sharpening pass (off by default, 35% strength) offsets
the resolve softening: it runs at AMD's FSR1 reference tuning over the
shared output-sized intermediate and blends towards the unsharpened
pixel, so strength is a consistent 0-100% control with a true bypass at
0%. The FSR branch is never sharpened. Strength presets live on a 5%
grid; each preset x noise mode gets a lazily built pipeline, since no
supported version exposes a float uniform setter on a render pass.

Controls sit on the main config page in both the Cloth and Sodium UIs,
guarded to 1.21.11+ like the fsr option; older versions are untouched
(scale slider ranges revert to 200% there). The dev-only gametest
classes are excluded from the shipped jars.

All four stonecutter targets build: 1.21.11-fabric, 26.2-fabric,
26.2-neoforge, 26.3-fabric.
@Zolo101 Zolo101 linked an issue Sep 20, 2026 that may be closed by this pull request
@Zolo101
Zolo101 merged commit dc1a711 into Zolo101:stonecutter Sep 20, 2026
1 check failed
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.

RGSS Downsampling

2 participants