Shaders: limit highlights on small dust sprites and preserve transmission #2156

Merged
Yoshi-233 merged 1 commit from upstream-pr/2156 into main 2026-11-30 14:12:04 +00:00
Yoshi-233 commented 2026-11-29 10:01:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T10:01:01Z.


Reproduction

On an RTX 4070 Ti SUPER, moving white specks stand out against the ceiling and dark furniture in the living room from the v107 save. I captured scene colour immediately before and after a single particle draw. It added 560 separate spots with a linear luminance increase above 0.1, each covering 1–7 input pixels. Disabling the draw for a comparison removed the specks. The second same-named particle program and the star pass had no such effect. Scene input was 2560×1440 with DLSS Quality and 3840×2160 output. Related to #695.

Change

Set VICTORY_PARTICLE_KNEE=0.012 to try the opt-in on the identified dual-source pixel program. It estimates projected sprite area from barycentric derivatives and applies a soft shoulder to the brightest emission. The weight fades between areas of 16 and 64 input pixels. Both source colour and transmission use the same weight so that attenuating a mote in front of a bright window also restores background transmission. The selected knee participates in the shader cache key. The default leaves the original translation active.

Validation

  • A same-EXE comparison on the 4070 Ti SUPER used separate shader and pipeline caches. Across 36 untreated images the median visible speck counts for the ceiling, dark cabinet and wall were 36.5, 16.5 and 7. All three medians were zero across 48 treated images. In four captured treated draws 671–674 faint spots per draw still contributed light. These counts describe the selected room and camera.
  • In eight treated draws at a window the median per-draw darkening for attenuating spots was 0.59%. Legitimately bright dust from this material can also become dimmer. I would welcome a check in another scene with the same material.
  • Built after merging with upstream main at 829188e96. Compared the unmodified compiler, patch disabled and patch enabled on six shader inputs for both 32- and 64-lane target settings. All 36 emitted programs passed the Windows DXIL validator. With the option disabled all six were byte-identical to main at each width. With it enabled only the measured particle program changed. The live comparison was on the 4070 Ti SUPER.

The Windows shader-library test binary passed all 462 enabled tests, with the suite's 9 marked tests ignored. I resumed by exact test name after the first shell wait timed out. The Windows Clippy check stops on the existing unused unwind_copy in victory-loader, tracked by #2019.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5549639542 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2156). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-29T10:01:01Z. --- ## Reproduction On an RTX 4070 Ti SUPER, moving white specks stand out against the ceiling and dark furniture in the living room from the v107 save. I captured scene colour immediately before and after a single particle draw. It added 560 separate spots with a linear luminance increase above 0.1, each covering 1–7 input pixels. Disabling the draw for a comparison removed the specks. The second same-named particle program and the star pass had no such effect. Scene input was 2560×1440 with DLSS Quality and 3840×2160 output. Related to #695. ## Change Set `VICTORY_PARTICLE_KNEE=0.012` to try the opt-in on the identified dual-source pixel program. It estimates projected sprite area from barycentric derivatives and applies a soft shoulder to the brightest emission. The weight fades between areas of 16 and 64 input pixels. Both source colour and transmission use the same weight so that attenuating a mote in front of a bright window also restores background transmission. The selected knee participates in the shader cache key. The default leaves the original translation active. ## Validation - A same-EXE comparison on the 4070 Ti SUPER used separate shader and pipeline caches. Across 36 untreated images the median visible speck counts for the ceiling, dark cabinet and wall were 36.5, 16.5 and 7. All three medians were zero across 48 treated images. In four captured treated draws 671–674 faint spots per draw still contributed light. These counts describe the selected room and camera. - In eight treated draws at a window the median per-draw darkening for attenuating spots was 0.59%. Legitimately bright dust from this material can also become dimmer. I would welcome a check in another scene with the same material. - Built after merging with upstream main at `829188e96`. Compared the unmodified compiler, patch disabled and patch enabled on six shader inputs for both 32- and 64-lane target settings. All 36 emitted programs passed the Windows DXIL validator. With the option disabled all six were byte-identical to main at each width. With it enabled only the measured particle program changed. The live comparison was on the 4070 Ti SUPER. The Windows shader-library test binary passed all 462 enabled tests, with the suite's 9 marked tests ignored. I resumed by exact test name after the first shell wait timed out. The Windows [Clippy check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46250206637/job/141306486519) stops on the existing unused `unwind_copy` in `victory-loader`, tracked by #2019.
notdxbi commented 2026-11-29 14:08:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by notdxbi on 2026-11-29T14:08:51Z.


Independent confirmation on a different machine and OS. This commit, ported unchanged to Vice-Tay main fe7c6e52 apart from Vice-Tay's extra early_depth argument, on an RTX 5060 8 GB, Linux (Nobara 44, GE-Proton11-14, driver 620.70.06), Series S, DLSS Quality. It's the same exe for both runs, and the only change in the launch settings is VICTORY_PARTICLE_KNEE=0.012. Jason's house, kitchen ceiling, wall and cabinets, pipeline queue empty, 60 s of video plus 20 lossless 2560×1440 frames per run:

knee unset knee 0.012
Ceiling box, specks/frame (20 lossless frames) 40.5 median 0 in all 20
Dark flat surfaces, per Mpx (lossless / video) 107.6 / 94.0 17.4 / 16.0 (only object edges left)
Rendered fps while recording 2.1 2.1

No new artifacts in either video. The camera and time of day differ between the two loads; details, crops and videos are in TaynanGT/Vice-Tay#444.

AI use: Claude Code (Claude Opus 5.5); the runs were played by hand.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7257076683 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2156#issuecomment-7257076683). Originally posted by [notdxbi](https://github.com/notdxbi) on 2026-11-29T14:08:51Z. --- Independent confirmation on a different machine and OS. This commit, ported unchanged to Vice-Tay `main` fe7c6e52 apart from Vice-Tay's extra `early_depth` argument, on an **RTX 5060 8 GB, Linux (Nobara 44, GE-Proton11-14, driver 620.70.06), Series S, DLSS Quality**. It's the same exe for both runs, and the only change in the launch settings is `VICTORY_PARTICLE_KNEE=0.012`. Jason's house, kitchen ceiling, wall and cabinets, pipeline queue empty, 60 s of video plus 20 lossless 2560×1440 frames per run: | | knee unset | knee 0.012 | |---|---:|---:| | Ceiling box, specks/frame (20 lossless frames) | 40.5 median | **0** in all 20 | | Dark flat surfaces, per Mpx (lossless / video) | 107.6 / 94.0 | 17.4 / 16.0 (only object edges left) | | Rendered fps while recording | 2.1 | 2.1 | No new artifacts in either video. The camera and time of day differ between the two loads; details, crops and videos are in TaynanGT/Vice-Tay#444. AI use: Claude Code (Claude Opus 5.5); the runs were played by hand.
Yoshi-233 commented 2026-11-30 01:09:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-30T01:09:38Z.


@notdxbi Thanks for porting this to Vice-Tay and measuring it on the 5060. Getting zero specks in the ceiling box in all 20 treated frames is a useful cross-check of the 4070 Ti SUPER result. I also appreciate the note about the different camera positions and time of day. The remaining visual question for this draft is how the same material looks when dust should be bright, for example against a sunlit window. The indoor results support keeping the knee opt-in while that is open.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7265894387 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2156#issuecomment-7265894387). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-30T01:09:38Z. --- @notdxbi Thanks for porting this to Vice-Tay and measuring it on the 5060. Getting zero specks in the ceiling box in all 20 treated frames is a useful cross-check of the 4070 Ti SUPER result. I also appreciate the note about the different camera positions and time of day. The remaining visual question for this draft is how the same material looks when dust *should* be bright, for example against a sunlit window. The indoor results support keeping the knee opt-in while that is open.
nick0451 commented 2026-11-30 09:21:50 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-30T09:21:50Z.


Checked in another scene, as you asked: a small restaurant interior in the city (Series S, DLSS performance, RT off, frame generation off). RTX 3090 24 GB, i9-14900K, 32 GB.

Builds: v2026.11.29.05 (41adb551) against the same with this PR merged (8cd858b0) and VICTORY_PARTICLE_KNEE=0.012. A player walked the room while I captured stills and 10-frame bursts (about 3 frames a second) during movement.

  • Release: dozens of small bright white specks float across the whole room, at every depth: against the walls, the ceiling flags, and in front of the characters.
  • With this PR and the knee: fewer, but not gone. My still from the same spot and the 10 burst frames taken while walking show none in the air. The player, though, still saw floating specks in the restaurant while moving (corrected after the player's report; I first wrote that they were gone). So it reduces them here, and the captures missed the ones still there. In a later session on a build without this PR (#1930 only), the specks were back in the burst frames.
  • What stays: bright glittery smears on the wood floor and small specks on clothing while moving. These sit on surfaces, not in the air. They look like the reflection sheen of #1172, not this material, and this PR doesn't claim to fix them.
  • No visible dimming of legitimate highlights in this room. I didn't measure it.

Untreated and treated were different sessions, so the sun angle differed. The comparison is by eye, not a count like yours.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7274103288 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2156#issuecomment-7274103288). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-30T09:21:50Z. --- Checked in another scene, as you asked: a small restaurant interior in the city (Series S, DLSS performance, RT off, frame generation off). RTX 3090 24 GB, i9-14900K, 32 GB. Builds: v2026.11.29.05 (`41adb551`) against the same with this PR merged (`8cd858b0`) and `VICTORY_PARTICLE_KNEE=0.012`. A player walked the room while I captured stills and 10-frame bursts (about 3 frames a second) during movement. - **Release:** dozens of small bright white specks float across the whole room, at every depth: against the walls, the ceiling flags, and in front of the characters. - **With this PR and the knee:** fewer, but not gone. My still from the same spot and the 10 burst frames taken while walking show none in the air. **The player, though, still saw floating specks in the restaurant while moving** *(corrected after the player's report; I first wrote that they were gone)*. So it reduces them here, and the captures missed the ones still there. In a later session on a build without this PR (#1930 only), the specks were back in the burst frames. - **What stays:** bright glittery smears on the wood floor and small specks on clothing while moving. These sit on surfaces, not in the air. They look like the reflection sheen of #1172, not this material, and this PR doesn't claim to fix them. - No visible dimming of legitimate highlights in this room. I didn't measure it. Untreated and treated were different sessions, so the sun angle differed. The comparison is by eye, not a count like yours. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
trustno1-coder/VIctory-NVIDIA!2156
No description provided.