Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
LT21: meshes are extracted after visibility ranges. Bevy 0.20 runs extract_visibility_ranges and its mesh extraction in no set order; a mesh re-extracted because its VisibilityRange changed, when meshes went first, baked the range's previous buffer slot into its MeshInputUniform and kept it until its range changed again, so the GPU dithered it by an older range than the one the CPU culled by. raea-sys-lod rewrites a part's ranges as the eye moves (a city tile's origin is the world's), so a level could be in range on the CPU and wholly dithered away on the GPU: on the 540p detail fly over 1917 Berlin, tile 39140_581855's LOD1, in range and 14% faded out, drew nothing on frames 33 and 34 and snapped in over 35 and 36 (29 one-frame spike blocks at 35; 12 at 226 on the same horizon), while its LOD2 drew its 14% of dots. Taking that tile out of the frame leaves the area steady. raea-sys-lod's install now orders MeshExtractionSystems after extract_visibility_ranges in the render app's ExtractSchedule. Crate tests pass; a render on the next rebuild checks the spikes.
shinyobjectzd399e3832514
diff --git a/systems/lod/src/lib.rs b/systems/lod/src/lib.rsindex 729c9f9a..48074450 100644--- a/systems/lod/src/lib.rs+++ b/systems/lod/src/lib.rs@@ -49,6 +49,13 @@ struct ShadowLeft;pub fn install(app: &mut App) {app.register_type::<Detail>().add_systems(PostUpdate, apply.after(VisibilitySystems::CalculateBounds).after(bevy::transform::TransformSystems::Propagate).before(VisibilitySystems::CheckVisibility));+ // Bevy 0.20 extracts meshes and visibility ranges in no set order. A mesh re-extracted for its changed range before+ // the ranges are read bakes the range's previous slot into its uniform and keeps it until its range changes again:+ // the GPU dithers it by a range the CPU no longer culls by (on the 540p fly a tile's LOD1, in range at 14% faded,+ // drew nothing for two frames, then snapped in). Meshes are extracted after the ranges.+ if let Some(render) = app.get_sub_app_mut(bevy::render::RenderApp) {+ render.configure_sets(bevy::render::ExtractSchedule, bevy::pbr::MeshExtractionSystems.after(bevy::render::view::extract_visibility_ranges));+ }match std::env::var("RAEA_LOD_DEBUG").as_deref() {Ok("time") => {app.init_resource::<LodTime>();