Skip to content

armgit / raea

Public Imported from GitHub
0

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.

raea-runtime-export keeps under its crate limit with LX6 and LT1's plan: the exposure filter's comment trimmed

Zachary Guglin6350c5deb08b
diff --git a/runtime/export/src/render.rs b/runtime/export/src/render.rs
index 06db6042..2cde0f04 100644
--- a/runtime/export/src/render.rs
+++ b/runtime/export/src/render.rs
@@ -151,10 +151,8 @@ fn with_exposure(said: String, out: &Path, manifest: Option<&Path>) -> String {
}
match raea_sys_light_meter::exposure::of_pngs(&pngs) {
Ok((e, mut v)) => {
- // a frame of the page's own fill (no 3D in the render, no footage on it: a brand card's dark ground) is dark
- // or bright by design, and the advice ("a fill, an ambient or the sky's light reaches them nowhere") is a 3D
- // scene's: it's measured, not said. A frame with footage keeps it (a clip that drew black). 11-19: the
- // walkaround's logo card warned on every stills render.
+ // a frame of the page's own fill (no 3D, no footage: a brand card's ground) is lit by design, so the 3D lighting
+ // advice is measured, not said; a frame with footage keeps it (a clip that drew black). 11-19: a logo card's warn
let doc: Option<serde_json::Value> = manifest.and_then(|m| std::fs::read_to_string(m).ok()).and_then(|t| serde_json::from_str(&t).ok());
if let Some(d) = doc.as_ref().filter(|d| d["has3d"] == false) {
let frames = d["frames"].as_array().cloned().unwrap_or_default();
@@ -176,11 +174,11 @@ fn with_exposure(said: String, out: &Path, manifest: Option<&Path>) -> String {
}
}
let fs = raea_sys_light_meter::exposure::said(&v); // counted with the render's other findings (DR3)
- if let (Some(m), Some(mut doc)) = (manifest, doc) {
- if let Some(o) = doc.as_object_mut() {
- o.insert("exposure".into(), v.clone());
- let _ = std::fs::write(m, doc.to_string());
- }
+ if let (Some(m), Some(mut doc)) = (manifest, doc)
+ && let Some(o) = doc.as_object_mut()
+ {
+ o.insert("exposure".into(), v.clone());
+ let _ = std::fs::write(m, doc.to_string());
}
let mut msg = format!("{said}\nEXPOSURE {}", e.line());
for f in &fs {