Open source · MIT · Swift + Metal

MSPR / MULTISAMPLE PHASE RECONSTRUCTION

Recover the samples
resolve throws away.

A 2x spatial upscaler for Apple GPUs that reconstructs the four color samples already produced by 4x MSAA—before a conventional resolve averages them into one pixel.

  • 01Deterministicsingle-frame output
  • 02Tile-localbuilt for Apple GPUs
  • 03Model-freezero weights or history
2× UPSCALING / SAME FIELD OF VIEW
LOW-RES RASTER
4 × 4 source areafour samples per LR pixel
MSPR OUTPUT
8 × 8 output areafour reconstructed phases

2× width + 2× height = 4× output pixels, over the same view.

CONVENTIONAL RESOLVE4 samples → 1 averagesubpixel phase is discarded
MSPR PRE-RESOLVE4 samples → 4 output phasesphase evidence becomes 2× detail
ARCHIVED IPHONE 13 EVIDENCE

Quality and full-path GPU time use the same nine-scene iPhone 13 matrix.

30.301dBMSPR-Quality mean
+1.021dBMSPR-Quality vs Bilinear
+0.629msMSPR-Lite full-path time vs Bilinear*

Quality × GPU cost

Higher quality.
Small frame cost.

In one nine-scene iPhone 13 matrix, MSPR-Quality gains 1.021 dB over Bilinear for 1.067 ms of added full-path GPU time; MSPR-Lite gains 0.785 dB for 0.629 ms.

THE RESULT MSPR improves mean quality over MetalFX Spatial, Bilinear 2×, and FSR1 while adding much less full-path time over Bilinear than MetalFX or FSR1.
Archived iPhone 13 nine-scene quality and full-path GPU comparison
Method Mean RGB PSNR ↑ 9-scene full-path GPU mean ↓ Added full-path time vs Bilinear ↓
MetalFX SpatialApple spatial upscaler Mean RGB PSNR ↑29.410 dB 9-scene full-path GPU mean ↓7.606 ms Added full-path time vs Bilinear ↓+5.017 ms
Bilinear 2×Simple spatial baseline Mean RGB PSNR ↑29.280 dB 9-scene full-path GPU mean ↓2.589 ms Added full-path time vs Bilinear ↓0 ms · reference
FSR1 EASU + RCASIn-project FSR1 pipeline Mean RGB PSNR ↑27.367 dB 9-scene full-path GPU mean ↓8.575 ms Added full-path time vs Bilinear ↓+5.986 ms

Scope: PSNR and performance use the same archived nine-scene iPhone 13 matrix. GPU values are arithmetic scene means of full command-buffer duration after 20 warm-up and 120 measured frames per mode. Added time subtracts Bilinear's 2.589 ms mean; it is a full-path comparison, not isolated kernel timing. Two Apple-demo-dependent rows are historical and not reproducible from this package.

Two operating points

One algorithm.
Two practical profiles.

Both paths consume pre-resolve MSAA evidence. Choose the neighborhood-aware Quality path or the fixed six-tap Lite path.

01 / QUALITY Best reconstruction

MSPR-Quality

A 3×3 resolved neighborhood, fixed phase coefficients, bounded detail, and content-adaptive blending for the strongest reconstruction.

Archived mean
30.301 dB
100-frame set
32.934 dB
Added full-path time vs Bilinear
+1.067 ms*
02 / LITE Minimum overhead

MSPR-Lite

A fixed six-tap, barrier-free path using four samples plus two horizontal resolved taps. No threadgroup staging.

Archived mean
30.065 dB
Quality delta
−0.237 dB
Added full-path time vs Bilinear
+0.629 ms*

Metal rendering contract

Keep phase evidence on-chip.

MSPR runs before conventional resolve, keeps working data in tile memory, and persists only the final 2× image.

Input4× MSAA color + local resolve
Temporal historyNot required
Motion / depthNot required
Model weightsNot required

Measured evidence

A clear gain in the documented matrix.

Archived physical-device results use same-frame Direct 2× references. The broader 100-frame set is secondary, project-built evidence.

RGB PSNR / HIGHER IS BETTERIPHONE 13 · 9 SCENES
Archived nine-scene mean PSNR: MSPR-Quality 30.301 dB, MSPR-Lite 30.065 dB, MetalFX 29.410 dB, Bilinear 29.280 dB, FSR1 27.367 dB
Archived nine-scene mean. The chart is evidence for the documented workloads, not a universal ranking.

Run the demo

From clone to pixels.

The repository includes four shared schemes for Quality and Lite on iOS and macOS. A physical Apple GPU is required for the imageblock path and performance conclusions.

  1. 01

    Open Demo/NeuralUpsampling.xcodeproj in Xcode 16 or newer.

  2. 02

    Select an MSPR-Quality or MSPR-Lite shared scheme.

  3. 03

    For an iPhone, select your Development Team and use a bundle identifier you control.

  4. 04

    Build and run. Use NSS_RENDER_MODE to switch comparison paths.

QUICK START
git clone https://github.com/long-0228/mspr2x.git
cd mspr2x
open Demo/NeuralUpsampling.xcodeproj
No package-manager dependencies

Reports and boundaries

The evidence is part of the release.

Read the full method, measurements, limitations, and provenance in English or Chinese.

PROVENANCE NOTE
Historical Apple demo scenes are not distributed.

The archived temple and fullscreen_image rows used assets from Apple's downloadable order-independent-transparency demo for testing only. Those assets are omitted because this project does not grant redistribution rights. Current source reproduction covers seven project-authored procedural scenes.

Apple demo ↗

* Difference between nine-scene full-path GPU means on the archived iPhone 13 matrix. This is not isolated kernel timing; see the technical report for the complete contract.