#25949·bevy

GPU culling: prepass normal get artifacts when GpuPreprocessingMode::Culling is enabled

Author: jiangheng90Created Sep 27, 2026Updated Sep 28, 2026
LabelsC-BugS-Needs-Triage

Bevy version and features

0.18.1

[Optional] Relevant system information

AdapterInfo { name: "Apple M4", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal } SystemInfo { os: "macOS 27.0", kernel: "27.0.0", cpu: "Apple M4", core_count: "10", memory: "16.0 GiB" }

What you did

develop AerialPerspectiveEffect in atmosphere with google earth streaming lod data

What went wrong

prepass normal draw with incorrect position in lod popin when GpuPreprocessingMode::Culling is enabled

Additional information

Bevy 0.18.1 (macOS Metal) has a stale per-instance data bug when GpuPreprocessingMode::Culling is enabled: for several frames after the visible set changes between frames (LOD streaming), the prepass renders with outdated instance data — whole meshes are drawn with another instance's transform (displaced, floating, cracked seams). It self-heals after a few frames, so with frequent LOD switches it manifests as continuous flickering.

I found this while implementing an aerial-scattering AerialPerspectiveEffect that needs screen-space normals: everything was fine with a static sphere, but after hooking up Google Earth data (3D Tiles) and visualizing the normals on screen, the positions were scrambled.

Further debugging shows PreprocessingOnly and the pure CPU path are both correct, and the main pass is correct in all modes — i.e. compute preprocessing is fine; the culling half is what breaks. My project does not use VisibilityRange, so this is another instance of the same class of defect as #24381 (per-instance data baked at extraction going stale on the GPU path). The temporary mitigation is to cap max_supported_mode at PreprocessingOnly.

My project depends on bigspace, which has not caught up with bevy 0.19 yet, so I cannot verify whether this is fixed there; I also found no similar issue report, so I'm filing this just in case.

Image