Skip to content

Reuse native shader programs across interpolated float endpoints - #391

Draft
Roxas2712 wants to merge 18 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-continuous-shader-uniforms
Draft

Roxas2712 wants to merge 18 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-continuous-shader-uniforms

Conversation

@Roxas2712

Copy link
Copy Markdown

A shader float can interpolate between 0 and 1, then reach an endpoint. Treating that endpoint as another compile-time constant creates another synchronous GPU compiler/pipeline event during the visible transition. Keep a float dynamic after an accepted scalar write has actually supplied an interior value. Retain independent bool specialization and all original native values, arithmetic, return values, texture ownership, stack leases and release behavior.

The fork and actual offered public component each pass 118 native LOVE12/Metal checks. The new fixture preserves reference pixels across 0 -> .25 -> 1 -> 0 and an independent bool toggle. The exact earlier policy in an owned control host reproduces the additional endpoint program; its pixels remain correct. Current fork source includes main 1658cb0 and passes 8 focused groups including native RS options 38/148; the preceding main a8833b3 combination passed 252 groups.

Real unchanged-consumer High Third-Person/rain comparison on Apple M3: 8 observed continuous uniforms, 14 retained variants before/after 120 sampled plus 120 unprofiled warm frames, 0 additional compiler events in those windows. The preceding policy grows 15 -> 21 variants. The matched sampled-frame maximum drops 3133.971 -> 137.913 ms. Adapter-recorded compile time stays 1.808914 s, compared with the preceding cumulative 7.259581 s. Warm mean remains 56.532 ms (~17.7 FPS), with 5368 indexed draws and 9 mirror planes at 512x3456. These figures are bounded measurements; startup/map-change stalls outside that window, OS-window/full-game acceptance and the 60 FPS target remain open.

Private source, player profiles and graphics quality are unchanged. Broader experiments without a reliable gain are excluded. See the qualification document for receipts and exact source distinctions.

Contributions by Roxas2712 — https://github.com/Roxas2712. Original additions are offered under LICENSE-ROXAS2712.md, including specific integration/distribution permission for Cedric / UNDERdecoded with visible credit. Existing upstream/third-party licences and rights remain intact.

Depends on #337, #388 and #389. The actually offered older component has independent Metal qualification; current upstream-main composition and full release qualification remain open. See docs/qa/native-continuous-shader-uniforms.md.

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.

1 participant