[pr-fix][rendering][shaders] Add opt-in frosted glass fixes (DARNER_KILL_CONTINUE, DARNER_GLASS_DITHER_OFF, DARNER_GLASS_DIRT_OPACITY) #96

Open
hingeowl wants to merge 1 commit from hingeowl/Darner:vercetti/frosted-glass-fixes into main
First-time contributor

Summary

Adds three opt-in frosted glass shader fixes (all off by default, all keyed in crates/darner-gpu/src/shader_cache.rs):

  • DARNER_KILL_CONTINUE=1 — keeps killed pixel lanes alive as helper lanes for subsequent quad reads (fixes frosted glass stipple when RT is off).
  • DARNER_GLASS_DITHER_OFF=1 — disables the wave32-vs-wave64 light-grid cell dither in house window glass shader b37565055f2f7d3b (fixes alternating dark stripes).
  • DARNER_GLASS_DIRT_OPACITY=<float> — overrides the glass dirt opacity factor in the house window glass shader.

Provenance

  • Ported from https://github.com/lobomfz/VIctory-xmem commits 3a056013c1f62b1565722adc33ff235831f30426, 0cdc0d0ba6f95a6902a6dcae41005153ec589110, and c8a311fc8b7ef45a5a25b0fcfb38001d69a150cb (GPL-3.0-or-later).
  • Rebased cleanly onto main (b3a615f).

Validation

  • Unit tests: cargo test --locked -p darner-gpu --lib shader_cache — 13/13 passed (including every_switch_of_the_translator_is_in_the_key).
  • 2-round 60 s interleaved spinning-camera A/B (RTX 4090 / Ryzen 9 7950X3D, Series X, 1440p, RT off, unset vs DARNER_KILL_CONTINUE=1, DARNER_GLASS_DITHER_OFF=1, DARNER_GLASS_DIRT_OPACITY=0.0, same binary):
Metric Default (unset, R1 / R2) Frosted glass fixes ON (R1 cold / R2 warm)
Draws/frame 8,058 / 7,773 7,770 / 7,286 (3.57% drift)
FPS (median) 21.8 / 20.7 21.4 / 21.5
FrameMedMs 46.7 / 46.9 ms 47.8 / 46.5 ms
FrameP95Ms 60.2 / 58.1 ms 63.6 / 59.9 ms
SubmitMs 32.2 / 32.7 ms 31.6 / 32.3 ms
GPU Busy / VRAM 64% / 21,927 MB 64% / 21,854 MB
  • Result: NEUTRAL (0 ms steady-state overhead once shader cache is warm in R2: 46.5 ms / 21.5 FPS vs 46.9 ms / 20.7 FPS), and screenshots inspected visually spotless (nonBlack=99.99%, magenta=0%, clean sliding glass door at shot-000s.png).
  • (Reference baseline on unmodified main b3a615f: 19.4 FPS, 49.6 ms med, 65.0 ms P95, 35.1 ms submit, 7,946 draws.)
## Summary Adds three opt-in frosted glass shader fixes (all **off by default**, all keyed in `crates/darner-gpu/src/shader_cache.rs`): - `DARNER_KILL_CONTINUE=1` — keeps killed pixel lanes alive as helper lanes for subsequent quad reads (fixes frosted glass stipple when RT is off). - `DARNER_GLASS_DITHER_OFF=1` — disables the wave32-vs-wave64 light-grid cell dither in house window glass shader `b37565055f2f7d3b` (fixes alternating dark stripes). - `DARNER_GLASS_DIRT_OPACITY=<float>` — overrides the glass dirt opacity factor in the house window glass shader. ## Provenance - Ported from `https://github.com/lobomfz/VIctory-xmem` commits `3a056013c1f62b1565722adc33ff235831f30426`, `0cdc0d0ba6f95a6902a6dcae41005153ec589110`, and `c8a311fc8b7ef45a5a25b0fcfb38001d69a150cb` (GPL-3.0-or-later). - Rebased cleanly onto `main` (`b3a615f`). ## Validation - **Unit tests:** `cargo test --locked -p darner-gpu --lib shader_cache` — **13/13 passed** (including `every_switch_of_the_translator_is_in_the_key`). - **2-round 60 s interleaved spinning-camera A/B** (RTX 4090 / Ryzen 9 7950X3D, Series X, 1440p, RT off, unset vs `DARNER_KILL_CONTINUE=1`, `DARNER_GLASS_DITHER_OFF=1`, `DARNER_GLASS_DIRT_OPACITY=0.0`, same binary): | Metric | Default (unset, R1 / R2) | Frosted glass fixes ON (R1 cold / R2 warm) | |---|---:|---:| | **Draws/frame** | `8,058` / `7,773` | `7,770` / `7,286` (`3.57%` drift) | | **FPS (median)** | `21.8` / `20.7` | `21.4` / `21.5` | | **FrameMedMs** | `46.7` / `46.9 ms` | `47.8` / `46.5 ms` | | **FrameP95Ms** | `60.2` / `58.1 ms` | `63.6` / `59.9 ms` | | **SubmitMs** | `32.2` / `32.7 ms` | `31.6` / `32.3 ms` | | **GPU Busy / VRAM** | `64%` / `21,927 MB` | `64%` / `21,854 MB` | - **Result:** **NEUTRAL** (`0 ms` steady-state overhead once shader cache is warm in R2: `46.5 ms` / `21.5 FPS` vs `46.9 ms` / `20.7 FPS`), and screenshots inspected visually spotless (`nonBlack=99.99%`, `magenta=0%`, clean sliding glass door at `shot-000s.png`). - *(Reference baseline on unmodified `main` `b3a615f`: `19.4 FPS`, `49.6 ms` med, `65.0 ms` P95, `35.1 ms` submit, `7,946` draws.)*
Ported from VIctory-xmem 3a056013, 0cdc0d0b, and c8a311fc (all off by default; keyed in shader_cache.rs).

Upstream-Repository: https://github.com/lobomfz/VIctory-xmem
Upstream-Commit: 3a056013c1f62b1565722adc33ff235831f30426
Upstream-Commit: 0cdc0d0ba6f95a6902a6dcae41005153ec589110
Upstream-Commit: c8a311fc8b7ef45a5a25b0fcfb38001d69a150cb
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'vercetti/frosted-glass-fixes:hingeowl-vercetti/frosted-glass-fixes'
git switch 'hingeowl-vercetti/frosted-glass-fixes'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'hingeowl-vercetti/frosted-glass-fixes'
git switch 'hingeowl-vercetti/frosted-glass-fixes'
git rebase 'main'
git switch 'main'
git merge --ff-only 'hingeowl-vercetti/frosted-glass-fixes'
git switch 'hingeowl-vercetti/frosted-glass-fixes'
git rebase 'main'
git switch 'main'
git merge --no-ff 'hingeowl-vercetti/frosted-glass-fixes'
git switch 'main'
git merge --squash 'hingeowl-vercetti/frosted-glass-fixes'
git switch 'main'
git merge --ff-only 'hingeowl-vercetti/frosted-glass-fixes'
git switch 'main'
git merge 'hingeowl-vercetti/frosted-glass-fixes'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!96
No description provided.