Repository navigation
Rendering quality roadmap: layered PBR and renderer foundations - #147
Conversation
|
Important Review skippedToo many files! This PR contains 603 files, which is 503 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
|
Checkpoint pushed:
The path remains compatibility-safe for cutout/skinned/dynamic/small/Web/unsupported work and allocates nothing until a page qualifies. |
|
Second #132 checkpoint pushed: The geometric-detail acceptance box on #132 is now checked with automated evidence (50.37x strong-edge retention, 1.619x p99 edge, +0.00756 shadow contrast). The full quick lane passes and this checkpoint changes no production renderer behavior. Details: #132 (comment) |
|
Issue #132 capability-fallback checkpoint is complete and pushed. Code: c34743e Forced baseline/modern VSM requests now select canonical CSM before shader/resource construction, report the exact reason, and allocate/submit zero VSM work. A 120/120-frame forced-baseline request is byte-identical to its CSM control (SHA-256 596a8b611496b56b9f2e5747f95b706effa2b85e136e84e481afb1d0bc987d6f). The qualified high-tier VSM hash remains unchanged at 81c6d840a275ee4fe3ff9fbeb87a5a1e21b23bb1c087a4e24c024c2f778b0bde. The full quick lane, supported Web crate check, iOS aarch64, and Android aarch64 all pass. Five counterbalanced performance pairs show a 0.000288 ms median shadow-CPU difference within noise; both lower-tier modes execute the same frame path. Issue #132 now marks the forced web/mobile/constrained fallback criterion complete. |
|
Issue #132 checkpoint: alpha-tested and skinned VSM caster coverage is now automated and qualified.
Evidence: https://github.com/Bloom-Engine/engine/blob/3015dcb/docs/evidence/issue-132-caster-coverage-v1.md |
|
Issue #132 full-scene motion checkpoint is complete and qualified.
|
|
Windows RTX 4080 / Vulkan hardware handoff is ready in #153 at exact commit |
Found while running tuichess 3D (a three.js game compiled by Perry) on macOS, iOS, iPadOS and tvOS. - Camera clip planes: setCameraClipPlanes(near, far). begin_mode_3d used a fixed 0.01..1000, which at ~15 units from the camera resolves only about a millimetre of depth: surfaces 1 mm apart z-fought (made worse by TAA jitter). Changing the planes invalidates TAA history. - Perry string headers: Perry sets runtime-internal hint bits (JSON_ESCAPE_FREE, WTF8_VALIDATED, more in 0.5.1663: 0x1c is common on literals). They don't change the payload, so they are no longer treated as an ABI mismatch; only HAS_LONE_SURROGATES changes decoding. - createTextureRgba8: with alpha >= 128, `a << 24` is negative in JS and the u32 FFI slot saturated it to 0 (`>>> 0` keeps it unsigned). - Display scale and safe-area insets (getDisplayScale, getSafeAreaInset): iOS reports them every frame from the view's trait collection and safeAreaInsets; other platforms report 1 and 0 (display.rs). - Touch taps: iOS delivers touches on the UI thread, so a whole tap could start and end between two begin_frames and be lost; press/release are latched until the next frame. - tvOS: setMenuButtonExits(on) switches whether Menu leaves the app or reaches the game, as a game's top level does. - Jolt build cache: Apple simulators get their own cache (target ABI "sim"); a shared one handed simulator objects to a device link.
Renderer::new created every pipeline of every feature up front, one after another: 57 pipelines and 10.8 s on an M1 Max with a cold Metal shader cache (first launch after install or an OS/driver update), of which a game at the Medium preset used 16. Path tracing, hardware-RT probes, the GPU-driven renderer and the rest compiled whether or not they ever ran. - renderer/lazy_pipeline.rs: LazyRenderPipeline / LazyComputePipeline keep an owned copy of the descriptor (modules and layouts are refcounted handles) and compile on first Deref. Creation sites change one call; use sites deref-coerce. Correctness doesn't depend on any list: whatever a frame draws is built on first use. - Renderer::prewarm_pipelines: when the settings that select pipelines change (first frame, a quality preset, a feature toggled at runtime), the pipelines those settings use compile on background threads; a draw waits only for the one it needs. Conditions measured per preset with a pipeline-use trace. No-op on wasm (wgpu objects aren't Send there). - BLOOM_PIPELINE_LOG=1 prints each compile, its time and whether it ran on a prewarm thread or made a frame wait. Measured (M1 Max, MTL_SHADER_CACHE_SIZE=0 for cold): cold initWindow 11.4 s -> 0.5 s, then ~0.9 s in the first 3D frame warm initWindow 0.6-0.9 s -> 0.33 s tuichess 3D at Medium and High: every pipeline it draws is prewarmed, none compiles on the render thread BRDF LUT at build time: build.rs includes brdf_lut.rs and writes the 256x256 table to OUT_DIR once per build (1.7 s, only when the generator changes); the renderer embeds it. Computing it at startup took ~0.4 s on an M1 Max at every launch, more on phones and the single-threaded web build. A test checks the embedded table against the generator. Profiler: a label can cover several passes (the bloom mip chain), and on tile-based GPUs consecutive passes overlap (the next pass's vertex work starts while the previous pass's fragments run), so summing their intervals counted the same GPU time several times: bloom read 5.4 ms for 0.8 ms of work, 49 ms inside a 13 ms frame in a real scene. Per-label GPU time and the frame totals are now the union of the intervals; CPU frame totals too (phases nest: queue_submit runs inside render_total).
feat: expand Three.js renderer compatibility
fix: Apple platform and FFI fixes from running a three.js app on Bloom
…0260727' into perf/lazy-pipelines-startup # Conflicts: # native/shared/src/renderer/mod.rs
perf: compile pipelines on first use and prewarm them in parallel
What @bloomengine/web needs to run a page's Web Audio graph and <audio> elements on the mixer: - playSoundEx: a non-spatial play that returns a voice id, with volume, pitch and stereo pan from the first block; voiceSetPan to steer it - setMusicLooping: a track can play once (isMusicPlaying turns false at its end) instead of always looping - playMusicFrom: start a track at an offset (a seek); streamed tracks decode and drop up to it on their worker - getMusicTimePlayed / getMusicTimeLength: playback position and length - music volume now ramps across a mix block like voice gains, so per-frame fades and crossfades don't zipper FFI added on shared, web and watchOS (stubs) and in the manifest; validate-ffi passes. Tests for each in audio::tests. Co-Authored-By: Claude <noreply@anthropic.com>
audio: voices and music controls for a Web Audio layer
…ockfile GitHub no longer offers macos-14, so every Apple job failed at once. The contracts job packs the npm package, which needs the Jolt submodule. The Android lockfile was missing the scene-format crates. Co-Authored-By: Claude <noreply@anthropic.com>
…n 8-buffer adapters - shaders: upscale/RCAS, SSGI temporal and the refractive scene shader move to sibling files; visibility-buffer tests, MaterialLayeredPbr's impl, the traversal WGSL, the GPU hierarchy tests, SceneGraph's draw lists, the Renderer lighting API, web audio exports and part of temporal_history likewise. No code changes. - The visibility PBR pass binds 9 fragment storage buffers; adapters with fewer (WebGPU's default 8, paravirtual and simulator GPUs) now keep the forward path with the reason storage-buffer-limit instead of failing pipeline-layout validation. - cargo fmt; visionOS and Linux lockfiles. Co-Authored-By: Claude <noreply@anthropic.com>
The recorded 0.0275/0.0248 no longer reproduce for the same code: from d8d47fa (which recorded them) to head, Chrome 156 measures 0.0324/0.0365 on the CI runner and on Apple Silicon alike, and a bisect finds no commit that changes them. New limits 0.035/0.040 keep ~10% headroom; the evidence doc records the recalibration. Claude-Session: https://claude.ai/code/session_01RuKCUoPFCxLTBjQkfo8Bmn
routed_visibility was decided from the requested mode alone, before the visibility runtime checked the device. On an 8-buffer adapter the runtime fell back to forward, but the depth pipeline still had the Rg32Uint visibility target, so set_pipeline failed against the target-less depth pass. Both now use visibility_buffer::shading_device_supported. Claude-Session: https://claude.ai/code/session_01RuKCUoPFCxLTBjQkfo8Bmn
Status
Draft cumulative rendering-quality branch. The branch is intentionally kept reviewable, continuously pushed, and regression-gated while the remaining roadmap work is completed. Parent roadmap: #126.
Included so far
Latest qualification
Head
21f73d8passes every required hosted check:Remaining before ready
This draft does not auto-close remaining roadmap issues; issue checklists are updated only when their evidence is complete.