[pr-fix][rendering][lighting] Bound indoor particle and dust light via DARNER_AMBIENT_ALPHA #94

Open
hingeowl wants to merge 1 commit from hingeowl/Darner:vercetti/ambient-alpha into main
First-time contributor

Summary

Adds DARNER_AMBIENT_ALPHA=<multiple> (Role::Alpha for CS_SpatialFilterAlpha, default 1 when ambient lighting is active; 0 disables) to bound the light that transparent surfaces, particles, and dust receive indoors when ray tracing is off.

Provenance

  • Ported from https://github.com/lobomfz/VIctory-xmem commit e5a00326a064326bfb3bd0979fd5b02419eef2ce (GPL-3.0-or-later), adapted to Darner's ambient.rs and draw.rs.
  • Rebased cleanly onto main (b3a615f).

Validation

  • Unit tests: cargo test --locked -p darner-gpu --lib ambient passed.
  • 2-round 60 s interleaved spinning-camera A/B (RTX 4090 / Ryzen 9 7950X3D, Series X, 1440p, RT off, DARNER_AMBIENT=0.8 + DARNER_AMBIENT_AIR=1 enabled, DARNER_AMBIENT_ALPHA=0 vs 1, same binary):
Metric DARNER_AMBIENT_ALPHA=0 (R1 / R2) DARNER_AMBIENT_ALPHA=1 (R1 / R2)
Draws/frame 7,892 / 7,814 7,703 / 8,712
FPS (median) 21.9 / 20.9 21.2 / 21.8
FrameMedMs 46.7 / 48.4 ms 47.1 / 46.9 ms
FrameP95Ms 58.8 / 61.5 ms 58.6 / 60.0 ms
SubmitMs 32.0 / 32.7 ms 31.5 / 31.8 ms
GPU Busy / VRAM 65% / 21,837 MB 65% / 21,733 MB
  • Result: Zero performance or GPU overhead (even in R2 with +10% camera-phase draws, FrameMedMs was 46.9 ms vs 48.4 ms), and screenshots inspected visually spotless (nonBlack=99.99%, magenta=0%).
  • (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 `DARNER_AMBIENT_ALPHA=<multiple>` (`Role::Alpha` for `CS_SpatialFilterAlpha`, default `1` when ambient lighting is active; `0` disables) to bound the light that transparent surfaces, particles, and dust receive indoors when ray tracing is off. ## Provenance - Ported from `https://github.com/lobomfz/VIctory-xmem` commit `e5a00326a064326bfb3bd0979fd5b02419eef2ce` (GPL-3.0-or-later), adapted to Darner's `ambient.rs` and `draw.rs`. - Rebased cleanly onto `main` (`b3a615f`). ## Validation - **Unit tests:** `cargo test --locked -p darner-gpu --lib ambient` passed. - **2-round 60 s interleaved spinning-camera A/B** (RTX 4090 / Ryzen 9 7950X3D, Series X, 1440p, RT off, **`DARNER_AMBIENT=0.8` + `DARNER_AMBIENT_AIR=1`** enabled, `DARNER_AMBIENT_ALPHA=0` vs `1`, same binary): | Metric | `DARNER_AMBIENT_ALPHA=0` (R1 / R2) | `DARNER_AMBIENT_ALPHA=1` (R1 / R2) | |---|---:|---:| | **Draws/frame** | `7,892` / `7,814` | `7,703` / `8,712` | | **FPS (median)** | `21.9` / `20.9` | `21.2` / `21.8` | | **FrameMedMs** | `46.7` / `48.4 ms` | `47.1` / `46.9 ms` | | **FrameP95Ms** | `58.8` / `61.5 ms` | `58.6` / `60.0 ms` | | **SubmitMs** | `32.0` / `32.7 ms` | `31.5` / `31.8 ms` | | **GPU Busy / VRAM** | `65%` / `21,837 MB` | `65%` / `21,733 MB` | - **Result:** Zero performance or GPU overhead (even in R2 with +10% camera-phase draws, `FrameMedMs` was `46.9 ms` vs `48.4 ms`), and screenshots inspected visually spotless (`nonBlack=99.99%`, `magenta=0%`). - *(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 e5a00326, adapted to Darner's ambient.rs/draw.rs.

Upstream-Repository: https://github.com/lobomfz/VIctory-xmem
Upstream-Commit: e5a00326a064326bfb3bd0979fd5b02419eef2ce
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/ambient-alpha:hingeowl-vercetti/ambient-alpha'
git switch 'hingeowl-vercetti/ambient-alpha'

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/ambient-alpha'
git switch 'hingeowl-vercetti/ambient-alpha'
git rebase 'main'
git switch 'main'
git merge --ff-only 'hingeowl-vercetti/ambient-alpha'
git switch 'hingeowl-vercetti/ambient-alpha'
git rebase 'main'
git switch 'main'
git merge --no-ff 'hingeowl-vercetti/ambient-alpha'
git switch 'main'
git merge --squash 'hingeowl-vercetti/ambient-alpha'
git switch 'main'
git merge --ff-only 'hingeowl-vercetti/ambient-alpha'
git switch 'main'
git merge 'hingeowl-vercetti/ambient-alpha'
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!94
No description provided.