[pr-fix][rendering] Reflections: the left-out miss program's image cleared (DARNER_RAYMISS_CLEAR=1, off by default) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:pr6-raymiss-clear"
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?
Contributor role (optional)
What it changes
Re-filed from an earlier CodeFloe PR (that repo is gone; nothing was migrated). Same branch and commit.
Base: the branch (3 commits) is on
4db98e011, themaincommit it was cut from.mainis now4a92569fb. Not rebased (WIP; we rebase before WIP comes off, or sooner if you ask). A text-only trial merge (git merge-tree --write-tree --name-only trustno1/main pr6-raymiss-clear) merges cleanly: no conflicts.This is a draft. It has not been run in the game on this base, and it has no before and after.
What was wrong (suspected, not confirmed). The reflections' "missed everything" program (the miss program) writes the texels of the rays the screen-space passes resolve nothing for; the resolve after it writes only where it finds something.
mainleaves the opaque layer's dispatches of that program out (sky_miss_left_outindraw.rs); since an earlier CodeFloe PR (#309 there, not migrated; inmain) it runs when rays are found, so it is left out only with ray tracing off. Those texels then keep what the memory held: earlier frames' bytes, or another render target's where targets share memory (DARNER_ALIAS_TARGETS). The half-size reflection image is resolved from the frame before, so those bytes are fed back frame after frame. The fork reports we ported from saw coloured blocks, glitter and white frost on glass, while the transparent layer's program was left out too (it runs again since that change). On opaque glossy surfaces (car paint, chrome, floors) the same leftovers would show as noise. That could be what an earlier report showed on chrome and paint with ray tracing off (CodeFloe #74, closed, not migrated); that link is a guess, not confirmed: its reporter used a different card and had frame generation on, and no log was attached.New switch:
DARNER_RAYMISS_CLEAR=1. Default: not set (off), nothing changes. With1, in place of each left-out dispatch the image it would have written (ambient::MISS_LIGHT, else the first 2D R11G11B10 image among the program's table views) is cleared to zero with the existing UAV clear (list::clear_uav_on_host), in both the direct and the indirect dispatch path. No reflected light there, instead of old bytes.DARNER_RAYMISS_KEEP=0leaves it out always). This change does not repeat the earlier one.asked_for!). It does not change which dispatches are left out;DARNER_RAYMISS_KEEPkeeps its meaning (withKEEP=1nothing is left out, so nothing is cleared).list::clear_uav_on_hostandClearValuesbecomepub(crate); nothing else outsidedraw.rschanges. No shader change, so the shader cache key is unchanged.docs/findings.mdentry.Diff against
4db98e011: 4 files (README.md,crates/darner-gpu/src/draw.rs,crates/darner-gpu/src/list.rs,docs/findings.md), 3 commits. It stands alone.Credit: a port of the reflection part of Leonard Wernke's commit
accfd9fe0in a fork of the project's earlier GitHub repository (that pull request's repository is gone, so there is no link; there it wasRAYMISS_ZERO, on by default). diego's commitab37f19a7(also a pull request there;RAYMISS_CLEAR, on by default) is the same fix with a compute pass of its own; we took the smaller change and credit both. The commit message carries aCo-authored-byline for both. The rest of Leonard Wernke's commit (draw-skip classification, panel advice, an out-of-memory retry) is not ported.No upstream issue is confirmed to be this, so there is no
FixesorRefsline.Spec dependence
How it was tested
b4bc7ce5f. The head is now9dd1bd25e(branchpr6-raymiss-clear, based on4db98e011); the one commit after it only changesdocs/findings.md(cites the earlier PR #309 there), so the gates were not run again.cargo clippy --workspace --all-targets --locked -- -D warningswith-A clippy::unnecessary_lazy_evaluationsadded: passed. This deviates from the required gate: the flag is not part of it, and the exact required command was not run on this branch. (On ourpr6-specular-fillbranch the same two clippy gates passed without the flag, so it was probably not needed, but that is another branch.)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings, the same flag added: passed, same deviation.darner-gpu, full library: one test failed,watch::tests::ask_once_by_res_splits_reservations_without_refusals(once alsowatch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs). It is in a test file this change does not touch and it passes when run alone. The failures are unconfirmed and not baseline-checked: we did not runmainfor comparison, so we do not know whether they are flaky or old.cargo test --workspace --lockedas one command was not run. This change adds no unit test of its own.cargo xtask policy: passed.DARNER_RAYMISS_CLEAR=1(andDARNER_AMBIENT_AIR_ROOM=1, not part of this PR) on our play build, which was older than currentmainand did not have the earlier change that runs the program when rays are found. The user's words: "Our reflection and glass ports seem to work well". That is an impression: no scene, no screenshot pair, no A/B. A glow on glass and windows seen in the same days was fixed by an upstream update, not by this switch. Nothing was run on the tested revision above.main; whether the image it clears is the right one in every pipeline variant (the fallback search for a R11G11B10 image is untested in the game).Checklist
main. (git diff --stat 4db98e011 9dd1bd25e: the 4 files above. The branch is on4db98e011, not on currentmain; a trial merge is clean, see Base.)docs/asset-policy.md. (Text only;cargo xtask policypassed onb4bc7ce5f; the later commit is docs only.)Checked for overlap
host/menu.rs,host/panel.rsandhwrt.rs: none of this change's files. The earlier CodeFloe PR that runs the program when rays are found and the hardware ray tracing reflection fix (not migrated) are inmain; this PR acts only where the program is still left out, which is ray tracing off. Our sibling branchespr6-raymiss-estimated(DARNER_RAYMISS_ESTIMATED) andpr6-specular-filledit the same functionsky_miss_left_outindraw.rs, so a textual conflict is possible;pr6-raymiss-estimated,pr6-air-roomandpr6-specular-filladd a row to the same README table. Earlier reports on CodeFloe (not migrated) of reflection ghosting traced to skipped wave64 shaders and of reflections picking up texture colours are related, not claimed fixed.README.md,docs/findings.md); #7 (docs/findings.md); #8 (README.md,docs/findings.md); #9 (README.md,docs/findings.md); #10 (README.md,docs/findings.md); #11 (README.md). #5 share no file. Different changes; whichever lands first, the others take its rows when they are rebased.Update 2026-12-03: marked ready as it stands; the 'draft' and 'not rebased' wording above is out of date, nothing was re-run in the game, and the maintainer will handle the rebase.
This change was made with AI assistance (Claude Code).
darner rig, F1 AUTO-DETECT row, per-start switches (DARNER_AUTO_SWITCHES, on by default, =0 turns it off) #25WIP: [pr-fix][rendering] Reflections: the left-out miss program's image cleared (DARNER_RAYMISS_CLEAR=1, off by default)to [pr-fix][rendering] Reflections: the left-out miss program's image cleared (DARNER_RAYMISS_CLEAR=1, off by default)View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.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.