Reflection probes: rectangular boxes of unprobed lighting at some zoom levels #249
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#249
Loading…
Add table
Add a link
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?
Report
Zooming out from a house covered by several manual reflection probes, some zoom levels show screen-aligned rectangular "boxes" where probe lighting drops out. Those regions look like non-probed / default lighting, brighter than the surrounding probe-lit area. The boxes change with zoom level.
This is not new; it predates the deferred-lighting work.
Separately (to be tracked in its own issue), the probes make the house look darker than it should.
Suspects
The rectangles are screen-aligned and change with distance, which points at per-cluster probe selection in the VK clustered probe path (P2 clustered selection, probe cluster buffers):
probe cull:log line) rejects probes per view, by distance or the screen-size cutoff, at certain zooms, and the rejection isn't applied uniformly across clusters.The deferred lighting compute's per-tile lists and the probe top-N (
RenderVKProbeTopN) could make this worse, but don't cause it.Repro
A house with several manual probes, zooming out slowly. A screenshot is saved in
research/screens/probe_boxes.pngin the local tree.Findings (branch
probebox, commitsba753650f0+16eedb6662; not yet built or tested in the viewer)Root cause: the per-cluster probe cap overflowed, and the probes it kept were the wrong ones.
clean_probe_cluster.complisted the first 16 probes that touched a cluster, in upload order. Upload order is nearest-first by|centre - camera| - radius(llappviewer.cppp.dist). At default level 3, terrain-grid probes (r ≈ 27.7 m, 32 m spacing) and octree automatic probes (r = 8–30 m) therefore sort 10–20 m "nearer" than the house's small manual boxes (r ≈ 5–10 m) at the same place. In an overflowing cluster the manual probes were the ones dropped. That cluster (one screen tile × one depth slice) then got automatic-only lighting, while the neighbouring clusters had the manual probes (which override the automatic class where they cover a pixel). The result is screen-aligned, lighter rectangles.Numbers (zn 0.1, draw distance 256 m, 60° fov, 16:9; grid 16×9×24):
Checked and not at fault:
zinfo.zagree between the build and the lookup;g_frag_xyandgrid.xyare both in render pixels;Fix
1/dweight).PROBE_CLUSTER_CAPraised from 16 to 24, in both the shader andLLCleanRendererVK.probe_count = kept | candidates << 16; the sampler masks the low half.RenderReflectionProbeCountis below the number of candidates (the default is 256).Debug aid:
RenderVKDebugView 17Shows each pixel's cluster probe list. Fullbright faces aren't painted. The deferred path falls back to forward while it is on.
Before the fix, the boxes would have shown as red tiles with no blue over the house. After it, the house should be blue wherever manual probes cover it; red can remain, but the lighting should be continuous.
Test
Darkness (separate issue)
Not the same root cause. Under a manual box at depth ≥ 0.25,
m = min(dwsum[manual], 1)is 1, which fully replaces automatic/sky irradiance. A low-ambiance or dark interior capture therefore darkens the house; that is the lead to follow.Ticket audit 2026-10-07: done and shipped in 1.0.0 Beta 1. Ranked per-cluster probe selection keeps manual probes, cap raised 16 -> 24, debug view 17 (
ba753650f0,16eedb6662). Probe darkness is tracked in #250. If you still see the problem on the current beta, please reopen or file a new report.