Render continuously and optimize the glTF viewer

Remove vsync and dirty-flag frame gating, optimize PBR sampling and lighting, add a direct-to-canvas loadout, and preserve camera state on viewer resize.

Add regression coverage and update rendering documentation.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0b382-1e79-712b-abd1-d29201c9bb5e
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-09-18 08:58:27 +00:00
co-authored by heaust
parent bc957cf40d
commit 4784ad7e87
16 changed files with 573 additions and 178 deletions
-7
View File
@@ -161,7 +161,6 @@ impl Core {
if names.iter().any(|name| self.store.borrow().uses_rows(name)) {
self.refresh()?;
}
self.data.borrow_mut().mark_dirty();
Ok(())
}
@@ -219,7 +218,6 @@ impl Core {
.borrow_mut()
.delete_object(name, id)
.map_err(JsError::new)?;
self.data.borrow_mut().mark_dirty();
Ok(())
}
@@ -233,7 +231,6 @@ impl Core {
.borrow()
.sync_rows(name, first, count, gpu, &self.data.borrow())
.map_err(|error| JsError::new(&error))?;
self.data.borrow_mut().mark_dirty();
Ok(())
}
@@ -269,7 +266,6 @@ impl Core {
.borrow_mut()
.upload_texture(name, mip_level, image, gpu)
.map_err(|error| JsError::new(&error))?;
self.data.borrow_mut().mark_dirty();
Ok(())
}
@@ -296,9 +292,6 @@ impl Core {
.as_ref()
.is_some_and(|gpu| gpu.timestamp_queries);
self.render.set_profiling(enabled && supported);
if enabled && supported {
self.data.borrow_mut().mark_dirty();
}
supported
}