DLSS / MainPassResolutionOverride: point and spot lights are cut off in screen-aligned rectangles (cluster lookup uses the full viewport size)
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- computer-graphics
Direzione di ricerca
Read bevy_pbr/src/render/clustered_forward.wesl at view_fragment_cluster_index and bevy_pbr/src/render/light.rs in prepare_lights. Compare the viewport used for fragment cluster lookup with the viewport used to calculate cluster_factors, then check how MainPassResolutionOverride supplies main_pass_viewport. Done means clustered lights align at reduced main pass resolution and the reported cutoff is gone; verify at both overridden and full resolution.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bevy version and features
- 0.20.1
- Features: default +
dlss(bevy_anti_alias::dlss). The camera hasDlss::<DlssSuperResolutionFeature>withDlssPerfQualityMode::Quality.
[Optional] Relevant system information
cargo 1.99.1 (5f94df478 2026-08-27)- Windows 11
AdapterInfo { name: "NVIDIA GeForce RTX 5080", vendor: 4318, device: 11266, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "616.92", backend: Vulkan }
What you did
A night scene with a SpotLight (range 45 m, outer angle 0.5 rad, no shadows) attached to
the camera like a flashlight, pointed at the ground. DLSS Super Resolution in Quality mode, so
the main pass renders at a lower resolution than the output (MainPassResolutionOverride).
GPU clustering is on (the default).
What went wrong
- Expected: one continuous light spot on the ground.
- Actual: parts of the lit area are missing in screen-aligned rectangles, with stair-step
edges along the cluster tile grid. It happens mostly at the far end of the light's range.
With DLSS DLAA (render resolution = output resolution) or without DLSS, everything is fine.
Additional information
bevy_pbr/src/render/clustered_forward.wesl, view_fragment_cluster_index:
let xy = vec2<u32>(floor((frag_coord - bindings::view.viewport.xy) * bindings::lights.cluster_factors.xy));
cluster_factors.xy is set in prepare_lights (bevy_pbr/src/render/light.rs) from the full
viewport:
cluster_factors: Vec4::new(
clusters.dimensions.x as f32 / extracted_view.viewport.z as f32,
clusters.dimensions.y as f32 / extracted_view.viewport.w as f32,
...
With MainPassResolutionOverride, frag_coord is in the reduced main pass resolution
(view.main_pass_viewport), while cluster_factors.xy is "clusters per output pixel". So every
fragment looks up the cluster at (render scale × its real position), i.e. a cluster up and to
the left of its own. Close to the camera the light covers almost every cluster, so nothing is
visible. At the far end of the light's range the neighbouring clusters don't contain the light,
and the light is cut off along the tile edges.
Workaround / proposed fix (one line), which makes the rectangles disappear:
let xy = vec2<u32>(floor((frag_coord - bindings::view.main_pass_viewport.xy)
/ bindings::view.main_pass_viewport.zw * vec2<f32>(bindings::lights.cluster_dimensions.xy)));
Without a resolution override main_pass_viewport equals viewport, so nothing changes there.
Another option is to compute cluster_factors.xy from the main pass size in prepare_lights.
Any other user of MainPassResolutionOverride is probably affected the same way.
Tested on one machine. Screenshots (same frame, DLSS Quality): before, after, and a zoomed
crop of the cut-off area.
- Lingua principale
- Rust
- Stelle
- 50k
- Fork
- 5.1k
- Merge medio
- 2g 20h
- PR unite (30g)
- 129
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bevyengine/bevy
-
C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bevyengine/bevy#26718 ·
I maintainer di solito rispondono entro 2 giorni
-
C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bevyengine/bevy#26689 ·
I maintainer di solito rispondono entro 2 giorni
-
Volumetric fog: a `FogVolume` with `Visibility::Hidden` is still renderedForse già presa @adityawrk l’ha presa 2 giorni fa. ApertaC-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bevyengine/bevy#26688 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
bevyengine/bevy#26684 ·
I maintainer di solito rispondono entro 2 giorni
-
Create a bevy_fuzzy exampleForse già presa @Tatsuya0330 l’ha presa 1 giorno fa. ApertaA-UI C-Examples C-Feature D-Straightforward S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bevyengine/bevy#26676 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di bevyengine/bevy
Issue simili
-
area:ui effort:medium enhancement P7 source:agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousApertamaintainer-needed p2 remote triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4605 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno