[pr-fix][rendering][lighting] Reflections: the opaque miss program runs under the reflection estimate (DARNER_RAYMISS_ESTIMATED=1, off by default) #14
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:pr6-raymiss-estimated"
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 (2 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-estimated) merges cleanly: no conflicts.This is a draft. It has not been run in the game by us on any base.
What this is about. The reflections' "missed everything" program (the miss program) is left out for opaque surfaces when the title's rays find nothing to hit, which on current
mainmeans ray tracing off (sky_miss_left_outindraw.rs; an earlier CodeFloe PR, #309 there, not migrated, made it run when rays are found; that change is inmain). It is left out for the sky light it gives each ray: a white grain on floors seen at a grazing angle. Leaving it out has a cost: the texels no screen-space pass resolves keep earlier frames' bytes, and the reflections feed them back frame after frame (the half-size reflection image is resolved from the frame before). A fork's frame capture showed colour noise over a convex mirror and glowing blue patches on a cell floor from that, and its run with the program kept had a clean mirror, floor and glass.With the reflection estimate on (
DARNER_AMBIENT_SPECULAR), the sky light the program gives is replaced by the estimate along the reflected direction, so the cause of the grain is gone, and there is less reason to leave the program out.New switch:
DARNER_RAYMISS_ESTIMATED=1. Default: not set (off), nothing changes. With1andDARNER_AMBIENT_SPECULARset, the opaque layer's dispatches of the miss program run while the reflection estimate follows them. WithoutDARNER_AMBIENT_SPECULARit does nothing.DARNER_AMBIENT_SPECULARis off indarner play's defaults, so by default this switch changes nothing for anyone.main: it needs no other pull request.DARNER_RAYMISS_KEEPis not set.KEEPkeeps its meaning and wins when set.ambient::specular_on()(isDARNER_AMBIENT_SPECULARset) together withambient::on(Role::Miss). The original asked only the second, whichDARNER_AMBIENTalone also makes true; that would have turned it on for people without the reflection estimate.miss_left_out(keep, estimated), with a unit test (miss_tests). Read once (asked_for!). No shader change, so the shader cache key is unchanged.docs/findings.mdentry.Diff against
4db98e011: 4 files (README.md,crates/darner-gpu/src/ambient.rs,crates/darner-gpu/src/draw.rs,docs/findings.md), 2 commits.Credit: a port of BaRian29's commit
5c212d21bin a fork of the project's earlier GitHub repository (a pull request there; that repository is gone, so there is no link). There it was on whenever the estimate was. The commit message carries aCo-authored-byline.No upstream issue covers this, so there is no
FixesorRefsline.Spec dependence
DARNER_AMBIENT_SPECULARon, a setting we do not use by default, and ray tracing off.How it was tested
e8f3642db(branchpr6-raymiss-estimated, based on4db98e011;mainhas moved, see Base).cargo clippy --workspace --all-targets --locked -- -D warningswith-A clippy::unnecessary_lazy_evaluationsadded: passed. The exact command without that flag was not run.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings, the same flag added: passed.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. We did not runmainfor comparison, so we do not know whether it is flaky or an old failure.cargo test --workspace --lockedas one command was not run. The newmiss_testsare part of thedarner-gpulibrary tests.cargo xtask policy: passed.Checklist
main. (git diff --stat 4db98e011 e8f3642db: 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.)Checked for overlap
host/menu.rs,host/panel.rsandhwrt.rs: none of this change's files. Our sibling branchespr6-raymiss-clear(DARNER_RAYMISS_CLEAR) andpr6-specular-fill(DARNER_AMBIENT_SPECULAR_FILL) also editsky_miss_left_out, and withpr6-air-roomall add a row and bump the setting count in the README's "Lighting and ray tracing" table. The fill branch and this one conflict textually in one closure ofsky_miss_left_outif both merge. Earlier reports on CodeFloe (not migrated) about lighting jumps with ray tracing off, reflections picking up texture colours and reflection ghosting 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][lighting] Reflections: the opaque miss program runs under the reflection estimate (DARNER_RAYMISS_ESTIMATED=1, off by default)to [pr-fix][rendering][lighting] Reflections: the opaque miss program runs under the reflection estimate (DARNER_RAYMISS_ESTIMATED=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.