d3d12: leave the reflections' miss program out for opaque and transparent surfaces #3248
Closed
github-bot
wants to merge 2 commits from
github-bot/gh-3248 into main
AGit
pull from: github-bot/gh-3248
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
github/ubiquitarianism--leonida!3248
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3248"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@YodaMMM on GitHub · 2026-12-02 22:21 UTC · original
YodaMMM:fix/d3d12-raymiss-left-out→main· +79 −1 · 4 files · 2 commits · closed without mergingClaimed in the coordination issue as: D3D12-RAYMISS-LEFT-OUT
What and why
Indoors, glass and glossy surfaces come out white-hot: an aquarium's lid and panes, glass table tops, parquet at a grazing angle. The bounds on reflections (
LEONIDA_REFLECT_MOST) and on transparent surfaces' light (LEONIDA_AMBIENT_ALPHA) do not change it.Without the ray-tracing structures nearly every reflection ray the screen-space march does not resolve reaches
CS_RayMiss, which gives it the sky's light. This leaves that program's dispatches out for opaque and transparent surfaces (its first root constant, 0 and 1), so those rays keep what the screen-space passes found. Water's dispatches are kept.LEONIDA_RAYMISS_KEEP=1runs them all, as before. With the structure builder running or hardware ray tracing (crate::pipeline::rays_found) nothing is left out: a miss is then a ray that left the scene.The approach is trustno1-coder/VIctory-NVIDIA's (
VICTORY_RAYMISS_KEEP, in itsambient.rsanddraw.rs, GPL-3.0-or-later), which leaves this program out by default.ambient.rs:is_missrecognises the program by name (CS_RayMiss_, the eight hex digits of a variant and the underscore after them; notCS_RayMiss_Volumetricsnor the screen probes').pipeline.rs: a compute shader that matches carries amissflag, set when the shader is kept.draw.rs: an indirect dispatch of it for surfaces 0 or 1 is left out while the rays find nothing, and counted as left out on purpose (Why::SkipList), as the mesh skip beside it is.docs/switches.md: regenerated (LEONIDA_RAYMISS_KEEP).Tested
cargo test -p leonida-gpu --lib ambient: 5 pass, including the newthe_reflections_miss_program_is_told_by_its_name.cargo clippy -p leonida-gpu --features diagnostics: nothing in the lines this touches.python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0.Why::SkipList): Series X,-Lowest 1080, frame generation 2x,LEONIDA_AMBIENT_FLOOR=0.4,LEONIDA_REFLECT_MOST=0.25, Jason's house at noon, the same kitchen view before and after.LEONIDA_REFLECT_MOSTandLEONIDA_AMBIENT_ALPHAon and off (alternated withLEONIDA_AB).efd21d8(the per-shader flag andWhy::SkipList) applied to main8422def: same machine and settings, several starts, Jason's house at noon, a street at night, a shop front at dusk and a shaded plaza at 17:00. The log has the "left out" line and the drops counted under the skip list; the floor indoors has no white sheen withLEONIDA_REFLECT_MOSTon or off (alternated withLEONIDA_AB).f4b082e, which adds therays_foundtest after review), and nothing with-RayTracingor-HardwareRT: with either the skip now stands aside by the code, which was not looked at on pictures. Not looked at in any form: water, a direct (not indirect) dispatch of the program, and the glass table itself.GPUs tested: NVIDIA GeForce RTX 4090, driver 596.49, Windows 10 Pro 19045
AI-assisted: yes. Written with Claude Fable 5.2 (Claude Code). A separate read-only reviewer agent (Claude Fable 5.2) audited the diff before this was opened. Its findings and what was done:
Why::SkipList, with awhyline;Shader::ambientis;Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Not a translator rule.)🤖 Generated with Claude Code
@merzleckeier on GitHub · 2026-12-02 22:30 UTC · original · reviewed
Reviewed
efd21d86. One scope question atdraw.rs:5455–5474: the rationale describes tracing without built structures, but the new skip also applies when software or hardware ray tracing is enabled. I compiled the exact decision method with synthetic roots, and withLEONIDA_HW_RT=1orLEONIDA_BVH_BUILDER=1it still skips layers 0 and 1, just as on the default path. Layer 2 and a missing root are kept, andLEONIDA_RAYMISS_KEEP=1keeps all layers. This checks the decision only. Is the change to active ray tracing intentional? If so, could the exact-head comparison cover both-RayTracingand-HardwareRT? The earlier default-path comparison does not establish what happens to genuine misses in those modes.@MoonEyes on GitHub · 2026-12-03 00:02 UTC · original
RUN (in game, batch of nine pull requests), each head merged with
git merge --no-ffonto main81efe4566, in one build: #313674bd1bcd4, #315653c3100ce, #3206d024194b3, #3248efd21d867, #3256e7aad1d4c, #32623643c2879, #2851b83b0b375, #312589bf1d328, #2642164506d01. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851'sLEONIDA_TITLE_MEMORY_SCALE, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only.AI-assisted (Claude Code).
@fiestorra on GitHub · 2026-12-03 00:12 UTC · original
VERIFY-3248 — Windows nativo: las cinco pruebas de
ambientpasan; el control mordió al tercer intentoefd21d867—ambient.rs(+34),draw.rs(+31)Ran at the head
Decisive control: I made
is_missreturntrueunconditionally, rebuilt and ran:So the test does check the negative cases, and the predicate is the one it imports.
Two earlier mutations, and I am reporting them because they behaved in a way I did not explain: I first relaxed the predicate to
w.starts_with(NAME)alone, and then tow.starts_with(NAME) && !w.is_empty()— both compiled (Compiling leonida-gpuprinted) and both left the test green, although by reading the assertion above the Volumetrics case should have failed under either. I could not explain it in the time this pass allowed, and I would rather write that down than quietly keep the third result as if the first two had never happened.What the change is: the reflections' miss program (
CS_RayMiss_plus eight hex digits of a variant's hash — notCS_RayMiss_Volumetrics, not the screen probes') gives every unresolved reflection ray the sky's light — "glass table tops, an aquarium's panes and glossy floors indoors came out white-hot (Jason's house at noon, 2026-12-01)". The fix leaves the miss program's dispatches for opaque and transparent surfaces out, so those rays keep what the screen-space passes found, with water's kept (LEONIDA_RAYMISS_KEEP=1restores the old behaviour).And the attribution is in the doc, which is the right house style:
trustno1-coder/VIctory-NVIDIA(VICTORY_RAYMISS_KEEP, GPL-3.0-or-later).What I could not test
Written with an AI assistant.
@YodaMMM on GitHub · 2026-12-03 00:28 UTC · original
Thank you for the review. It was not intended: the rationale only holds while the rays find nothing.
f4b082emakes the skip stand aside whencrate::pipeline::rays_found()is true (the structure builder running, or hardware ray tracing), the same testambient::on()uses for the stand-in. With-RayTracingor-HardwareRTall three layers of the miss program now run as the title asks.Checked at this head:
cargo test -p leonida-gpu --lib ambient(5 pass) andcargo clippy -p leonida-gpu --features diagnostics(clean in the lines touched). Not run in game at this head, and neither ray tracing mode was looked at on pictures; the description says so.AI-assisted (Claude Code).
@MoonEyes on GitHub · 2026-12-03 00:51 UTC · original
RUN (in game, batch of two pull requests), each head merged with
git merge --no-ffonto maind5b30be1c, in one build: #3035ed7048a14, #3248f4b082e96. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. #3248 was also run in a batch on its earlier headefd21d867; this run covers its current head. #3035 acts on cards under 12 GB in PCs of 20 GB or more, which this PC is (8 GB card, 32 GB of RAM); its memory effect was not measured here, only that nothing fell over.AI-assisted (Claude Code).
@x2Tweek on GitHub · 2026-12-03 00:55 UTC · original
RUN (in game, RTX 5090 32 GB, 4 runs of about 340 s each in the world): PASS, 0 device losses.
efd21d867merged withgit merge --no-ffontomain81efe4566(mergeb3a06aaca, clean).No other changes.
diagnostics,dlss,mimalloc.-SmoothMotion -PrecompileAll -Log,LEONIDA_D3D12_DRED=1. Each run loads the same save with scripted input (Enter through themenus, then walking).
nothing regressed. The spread between runs of the same build (10.8 to 15.1 fps for the PR, 12.8 to 16.6 for
main) is larger than any difference between the builds. I read no effect from this PR there.dropped 2.0/frame without a host pipeline: indirect kind 2: the reflections' miss program for opaque or transparent surfaces (LEONIDA_RAYMISS_KEEP=1 runs it)every5 s, with no device loss and no errors around it.
at the screen should check that indoors.
AI-assisted: the builds, the automated runs, the log reading and the write-up were done with Claude Opus 5.5
(Claude Code); the numbers are the runtime's own log lines.
@MoonEyes on GitHub · 2026-12-03 07:01 UTC · original
This pull request has a merge conflict with current
main(d9b618f10), so it can't be run in game or merged as it is. Could you merge the latestmaininto it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head.AI-assisted (Claude Code).
@fiestorra on GitHub · 2026-12-03 09:29 UTC · original
Tres más, estas de dos commits cada una, rebasadas contra
d9b618f10y empujadasEl resolvedor funcionó igual, porque el conflicto de cada commit es la misma línea del recuento (el
whileresuelve y sigue hasta que el rebase termina, en vez de asumir un solo bloque):Las tres: 0 marcadores,
pytest tests/test_d3d12_switches.py20 passed, ycargo test -p leonida-gpu --libcon el fallo de la iGPU de siempre.Y el desglose de tests, que es lo que separa estas tres de
#3009y#3126:leonida-gpu#3144#3171#3248O sea que de las cinco rebasadas hoy, tres no añaden tests (
#3009,#3126,#3144) y dos sí (#3171,#3248) — y todas tocan código de runtime. Quien fusione tiene ahora el dato delante en vez de descubrirlo después.Ramas
pr-3144-rebased,pr-3171-rebasedypr-3248-rebaseden el fork.Lo que esto ya permite decir: de los 22 conflictos, seis están resueltos y empujados (
#3009,#3126,#3140,#3144,#3171,#3248) más los cuatro de antes (#3233,#3253,#3269,#3289) más#3225y#3308— doce en total, y todos con el mismo patrón: una línea del recuento que se recalcula contando el fichero.Lo que no he resuelto: los que chocan en un
.rs(#2567,#2856,#3115,#3197) y los de varios commits con código (#2580,#3124,#3130,#3209,#3214) — esos no son una línea y no los toco sin leer el cambio.@MoonEyes on GitHub · 2026-12-03 18:03 UTC · original
Thanks for the work on this. This pull request has a merge conflict with the current
mainand has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latestmaininto your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome.Generated by Claude Code
Pull request closed