Ray tracing off: LIGHT ESTIMATE lights a room only from what is on screen, so the walls change when the camera turns #583
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner#583
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What looks wrong
Where: the first house of the story, inside. Living room in daytime, and bathroom from morning to night.
What I see: ray tracing is off. I stand in one place and turn the camera. When a bright thing comes into the picture (a window, a glass door, a TV, a lamp), the walls around it become bright. When I turn away, the same walls become dark again. At night, a view with no lit surface in it goes black. It looks as if the camera carries a lamp.
What it should look like: the light on a wall does not change when only the camera turns.
Time, to match the logs (UTC, 2026-12-05):
I recorded the light estimate (
crates/darner-gpu/src/ambient.rs) directly. The numbers below do not come from screenshots.How I measured
cellsandpointsof the stand-in to a file (DARNER_AMBIENT_TRACE). It changes no pass.DARNER_KEYSturns the camera with the stand-in pad: 40 steps, one step every 2 s.DARNER_EXIT_AFTER_WORLD_S=150ends the run. The runs show the same views. Two of them agree to the second, and the others are up to 4 s apart.gatherresult. I take the mean over the other surfaces of a record, then the median of the records in a class. For results 1 to 3 I use the records from 60 s to 150 s of the world (about 365 records in a run).Seen 1: the estimate on other surfaces follows the bright cells in view
Living room, daytime, default (
DARNER_AMBIENT=0.8).Seen 2: the bright cells are the cause
I calculated the
gatherpass again on the PC from the recorded cells, for 123 records. The result agrees with the recorded points (correlation 0.9965, ratio 0.999). Then I replaced the bright cells with the median cell and calculated again.The bright cells are 0.5 % to 32 % of the 2304 cells. They hold 50 % to 95 % of the sum of the cells (median 86 %). The median cell of the room has a luminance of about 0.011. The brightest cell of a view without a source has 0.09. A window, TV or lamp cell has up to 20, which is the bound in
keep.Seen 3: three switches, same run
DARNER_AMBIENT_ONCE=1DARNER_AMBIENT_HOLD=0.8c /= max(1.0, dot(c, LUMA) / 20.0)inkeep(line 437). With 0.1 the walls stay dark when the door comes into view, and the median of the picture goes to 0.055, not to 0.18 or 0.20. But the room is then too dark when the windows are in view (0.007 against 0.089). So this is evidence for the cause. It is not a fix.DARNER_AMBIENT_ONCE=1removes the part of the estimate's own light that comes back into the cells. That part is a factor of about 2.5. The change with the view stays.DARNER_AMBIENT_HOLD=0.8does not decrease the range. The slow mean contains the bright cells too and goes to 0.83 with the door in view. The value thatraisemixes (gather and slow mean) is then 0.66 with the door in view, against 0.46 in the default run. After the door leaves, this value falls to half in about 4 s, against about 1 s in the default run. The rise is as fast as before.Seen 4: a second room, from morning to night
Default settings, one run of 100 minutes. The save loads in the bathroom of the same house at about 10:17 game time. The camera makes one step every 8 s. The file has one record every 30 presents (0.72 s), 7283 records. The lamps of the room come on at about minute 62. The bright things are different by day and at night. Thus I group the records by the brightest cell in view.
gatherpass again for 288 night records. It agrees with the recorded points (correlation 0.99, ratio 1.000). With a lamp in view the estimate is 0.0262. Without the bright cells of the same frame it is 0.0080.Seen 5: the newest main shows the same
Build: main
c8258f955with the recording patch only, without my other commits. Same save, same key script, same switches as the default run of "Seen 1".47d21cd3bwith my commits (default run of "Seen 1")c8258f955with the recording patch onlyWhere it comes from in the code
I read these lines in
crates/darner-gpu/src/ambient.rs. They are at the same line numbers at47d21cd3band at mainc8258f955. The measurements above agree with them.keep(line 428) fills each of the 64x36 cells from the radiance cache of the frame before. That is only what is on screen.gather(line 469) gives each point the mean of all cells with the weightc.w / (dd + r2)(line 482). The weight has no occlusion and no direction, so a bright cell adds light to each point of the picture.raisemixes that value with the slow mean (line 702) and writesmax(was, found * least)(line 730).Not measured
Guesses for a fix, not measured
DARNER_AMBIENT_HOLDhold only the level of the room.Related, not the same fault
ambient.rsfor reflections. It does not changekeep,gatheror the slow mean.Builds
c8258f955) with the recording patch only47d21cd3b) with three commits of mine (LOD switches, texture copies, retirement queues) and the recording patchI built both with
--profile diag --features diagnostics. I started both with my own launcher script, not withdarner.exe play. The first line of each log has the switches.Recording patch
I can open the recording patch as a
pr-diagnosticspull request (DARNER_AMBIENT_TRACEinambient.rs, one call inqueue.rs) and give the script that reads the file.Before you post
RAY TRACING in F1
Off
GPU and driver
RTX 5080 16 GB, driver 621.24
CPU, RAM and Windows version
Ryzen 7 9800X3D, 32 GB, Windows 11 build 26200
Darner release or commit
v2026.12.04.01-4 (main
c8258f955) with a recording patch for "Seen 5"; v2026.12.03.02-66 (main47d21cd3b) with three commits of mine and the recording patch for "Seen 1" to "Seen 4". See "Builds" in the text above.Settings
Series X, 2560x1440 SDR, DLSS balanced (scene 1484x835), DLSS frame generation x3, ray tracing off, TEXTURE QUALITY medium, Reflex boost, preset custom.
My
DARNER_lines:DARNER_AMBIENT=0.8,DARNER_AMBIENT_SPECULAR=1,DARNER_SHADOW_LIFT=0,DARNER_RAYMISS_CLEAR=1,DARNER_TILE_HEAP_MB=3977,DARNER_TEXTURE_ROOM_PERCENT=84,DARNER_MEMORY_FLOOR_MB=512,DARNER_SHARPEN=0.25,DARNER_SHARPENER=cas,DARNER_MIP_BIAS=auto,DARNER_SKIP_BINK=1.For the measurement only:
DARNER_AMBIENT_TRACEandDARNER_AMBIENT_LAMP_CAP(both from the patch),DARNER_CAPTURE,DARNER_KEYS,DARNER_EXIT_AFTER_WORLD_S=150(6000 for the long run),DARNER_CACHE_DIR,DARNER_DATA_DIR.Log files attached
The logs are in two zip archives.
darner-logs-47d21cd3b.zip:
DARNER_AMBIENT_ONCE=1)DARNER_AMBIENT_HOLD=0.8)darner-logs-c8258f955.zip:
The user name in the paths is replaced with
<user>, and the path of my work folder is shortened. The log of the long run is darner-nvidia-20261205-034646.log. It has 310 MB, so I did not attach it. I can cut the part you need.No crash in play. Each run has one entry in crashes.log: 0xc0000005 at nvngx_dlssg.dll+0x16c40, during the exit that
DARNER_EXIT_AFTER_WORLD_Sstarts with frame generation on. The run onc8258f955has it too. That is a different problem, and #491 is about that exit.Are you working on a fix?
I'd like to, with some pointers
[bug][rendering][lighting] Ray tracing off: LIGHT ESTIMATE lights a room only from what is on screen, so the walls change when the camera turnsto Ray tracing off: LIGHT ESTIMATE lights a room only from what is on screen, so the walls change when the camera turns