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
+2 -2
View File
@@ -15,7 +15,7 @@ features:
- title: Raw transport
details: Start core/worker.js, correlate replies, and handle profiler events.
- title: Shared rows
details: Build typed views, allocate slots, and follow the dirty-lane protocol.
details: Build typed views, allocate slots, and control continuous rendering.
- title: Graph wire format
details: Encode, compile, and activate complete WebGPU render and compute graphs.
---
@@ -27,7 +27,7 @@ The browser main thread owns the HTML canvas and starts the module worker. The w
The application is responsible for three important contracts:
1. Correlate each reply by its `request` value; profiler messages are unsolicited.
2. Finish shared-memory writes before setting `signals[5]` (`sabDirty`).
2. Shared-memory value edits are rendered continuously; no `sabDirty` notification is needed. Pause before updates that must not overlap rendering.
3. Before a mutation that invalidates compiled render bundles, set `signals[6]` (`bundleDirty`), make the mutation, compile and switch a replacement graph, then let successful `switch-loadout` clear lane 6.
This site describes the current wire API, not the higher-level wrapper API.