Skip to content

Commit ab0babc

Browse files
SirSicardclaude
andauthored
log: the 3D camera is the shadow LOD origin, and bevy_time's warning is filtered (#104, #89 item 7)
* fix(log): a 3D camera that is the shadow LOD origin, and bevy_time's warning filtered Every 3D run with a point or spot light warned that no entity has ShadowLodOrigin (the scene camera draws into an image, so Bevy picked one arbitrarily): the scene camera now carries the marker. bevy_time's "did not receive the time from the render world" (raea drives Time by frame, with the render world in step) is filtered out of stderr, in Bevy's log filter and in raea_io_trace's logger; the event log keeps every record. Measured on main 5b2c773: a 3D still with a point light printed the ShadowLodOrigin warning, now nothing; a 2D still printed bevy_time's line, now not. The 54 dropped bevy_ecs CommandQueue lines on a 2D still are left as they are: their source still needs finding. Part of #89 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * check: keep raea-render under the size cap The two new comments said in five lines what fits in three; raea-render was 2 lines over tools/size.sh's 2,000-line crate limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 09ee785 commit ab0babc

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎engine/render/src/engine/open.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ impl Engine {
4646
// quiet on a good run: bevy_log's "Could not set global logger" (raea_io_trace owns `log` in a play
4747
// or a render, and its records go there, as meant) and a pass-timing readback that missed a frame
4848
// (RenderDiagnosticsPlugin's "Failed to download render statistics buffer": one second's bevy_passes lost)
49-
.set(bevy::log::LogPlugin { level: bevy::log::Level::WARN, filter: format!("{}bevy_log=off,bevy_asset::io::web=error,bevy_asset::io::source=error,fontdb=error,bevy_render::diagnostic::internal=error", bevy::log::DEFAULT_FILTER), ..default() })
49+
// and bevy_time's "did not receive the time from the render world" (raea steps Time by frame)
50+
.set(bevy::log::LogPlugin { level: bevy::log::Level::WARN, filter: format!("{}bevy_log=off,bevy_asset::io::web=error,bevy_asset::io::source=error,fontdb=error,bevy_render::diagnostic::internal=error,bevy_time=error", bevy::log::DEFAULT_FILTER), ..default() })
5051
// glTF models (scene3d) load from the paths their rows name, which are the edit's files wherever they are.
5152
// Hot reload (Bevy's file_watcher, in the bevy-all build) only when asked, RAEA_BEVY_WATCH=1: a render or a
5253
// baked play reloading an asset mid-run would draw frames that a render alone doesn't

‎engine/render/src/engine/spawn.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ pub(crate) fn spawn_camera(world: &mut World, e: Entity, vals: &BTreeMap<String,
5959
// single-sampled prepass (compose.rs)
6060
if has_3d && !preview() && !vals.contains_key("ssao") && !vals.contains_key("aa") && !vals.contains_key("outline") && !vals.contains_key("frame_looks") && !vals.contains_key("passes") { Msaa::default() } else { Msaa::Off },
6161
Transform::from_xyz(g("x", 0.0), g("y", 2.0), g("z", 9.0)).looking_at(Vec3::new(g("look_x", 0.0), g("look_y", 1.0), g("look_z", 0.0)), Vec3::Y),
62+
// the shadow LOD origin (drawing into an image, Bevy picked one and warned on every 3D run)
63+
bevy::camera::ShadowLodOrigin,
6264
));
6365
// three.js-style scenes (raea's 3D): a vertical field of view in degrees, and an ambient
6466
// light on the camera (brightness in cd/m²); without them the camera is as it always was

‎io/trace/src/lib.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ impl log::Log for Logger {
315315
// acts on: the `log` crate is third-party crates' (Bevy's Ctrl+C handler at info, fontdb's skipped faces: a
316316
// system font it can't parse, or a missing @font-face file raea_sys_page_net already names), which printed
317317
// on every render and buried what mattered (#34)
318-
if r.level() <= log::Level::Warn && !r.target().starts_with("fontdb") {
318+
// bevy_time's "did not receive the time from the render world" too: raea drives Time by frame with the render
319+
// world in step, so it says nothing a reader acts on
320+
if r.level() <= log::Level::Warn && !r.target().starts_with("fontdb") && !r.target().starts_with("bevy_time") {
319321
eprintln!("[{} {}] {}", r.level(), r.target(), r.args());
320322
}
321323
event("log", json!({"level": r.level().as_str(), "target": r.target(), "message": r.args().to_string()}));

0 commit comments

Comments
 (0)