[pr-fix][rendering][lighting] Indoor air held to the surface seen (DARNER_AMBIENT_AIR_ROOM=1, off by default) #18
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:pr6-air-room"
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-air-room) conflicts incrates/darner-gpu/src/ambient.rsonly;README.mdmerges cleanly. The conflict comes from the "Guard ambient lighting until GPU estimates are ready" change (merged intomainas3b7b6c6e9), which also editsambient.rs.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 (reported in the earlier repository, not reproduced by us). The fog cap (
DARNER_AMBIENT_AIR,1indarner play's defaults) caps the air in each slice at a multiple of the light around. Near the camera that cap is the room's light alone (the mean of the last seconds). In a dark interior whose mean a menu's white text, a lamp or the outdoors had raised, the near air could glow up to that mean: a milky green veil over dark rooms, garages and the wardrobe and mod-shop menus, with ray tracing off. It was an issue in the project's earlier GitHub repository (no link; it is gone).New switch:
DARNER_AMBIENT_AIR_ROOM=1. Default: not set (off), nothing changes. With1, the near end of the cap becomes the lesser of the room's light and the light of the surface seen in that direction (min(room, seen)), so the air in front of a dark wall cannot outshine it. Towards a bright window the cap still rises with distance to the window's light, so daylight haze and sunbeams outdoors stay. Only the fog cap's pass is touched, so it does nothing withoutDARNER_AMBIENT_AIR.#define AIR_ROOMof our host passclear_airinambient.rs, chosen when the passes are made (read once,air_room_asked). The title's shaders and the shader cache key are unchanged; there is no extra pass.clear_air_cap_bounds_dark_interiors(the cap's sum on numbers, not the shader itself) and the existingthe_passes_compile, which now also compiles the pass with the define.docs/findings.mdentry.Diff against
4db98e011: 3 files (README.md,crates/darner-gpu/src/ambient.rs,docs/findings.md), 2 commits. It stands alone.Credit: a port of dheerajc8073's commit
23e8243c3in a fork of the project's earlier GitHub repository (that repository is gone, so there is no link), where the change was unconditional and the test is theirs. Here it is behind a switch, off by default. The commit message carries aCo-authored-byline.No upstream issue covers this, so there is no
FixesorRefsline.Spec dependence
How it was tested
53938b084(branchpr6-air-room, 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: 1671 passed, none failed (includesclear_air_cap_bounds_dark_interiorsandthe_passes_compile).cargo test --workspace --lockedas one command was not run.cargo xtask policy: passed.DARNER_AMBIENT_AIR_ROOM=1(andDARNER_RAYMISS_CLEAR=1, not part of this PR) on our play build, which was older than currentmain. The user's words: "Our reflection and glass ports seem to work well". That is an impression about the pair: no scene, no screenshot pair, no A/B, and no look at a dark interior was recorded. 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(it conflicts inambient.rs).Checklist
main. (git diff --stat 4db98e011 53938b084: the 3 files above. The branch is on4db98e011, not on currentmain; a trial merge conflicts inambient.rs, 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. The ambient-guard change that now conflicts (3b7b6c6e9) is already inmain; it also editsclear_air, so this branch needs a rebase there. An earlier PR of ours that added lower F1 FOG CAP steps (CodeFloe, not migrated; it is inmain) lowers the cap everywhere, while this keeps the cap and holds only the near air to the surface seen. Our other reflection branches (pr6-raymiss-estimated,pr6-raymiss-clear,pr6-specular-fill) bump the same README count, andpr6-specular-fillalso editsambient.rs. An earlier CodeFloe report of lighting jumps with ray tracing off (not migrated) is 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); #12 (README.md,docs/findings.md); #14 (README.md,crates/darner-gpu/src/ambient.rs,docs/findings.md); #15 (README.md,docs/findings.md); #16 (README.md,docs/findings.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] Indoor air held to the surface seen (DARNER_AMBIENT_AIR_ROOM=1, off by default)to [pr-fix][rendering][lighting] Indoor air held to the surface seen (DARNER_AMBIENT_AIR_ROOM=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.