Skip to content

Aravath demo: CC0 characters, streamed world, and sword combat - #205

Merged
lazyxeon merged 46 commits into
mainfrom
cursor/aravath-greybox-b3de
Oct 16, 2026
Merged

lazyxeon merged 46 commits into
mainfrom
cursor/aravath-greybox-b3de

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Description

Rebased onto current main (5cba174c), which adds the required weaving replay case (848d4a9ef865c2b3e45a50bd0e440805cfb96af149a10fc47366b70a32fd379e) from #252.

determinism-replay requires all eleven cases: planner_pure, perception_world, gameplay_rng, fixed64, combat_resolve, destruction, gameplay_qa_aravath_slice, nav_reroute, causal_bridge, scripted_system, and weaving. The greybox golden hash stays 9b607d1a840ecd64.

PhysicsWorld::add_static_aabb from #252 stays, and remove_body stays for the greybox chunk trimeshes. CScript still has no physics or nav proxy. Image decodes stay on the capped helpers from #316.

The release job keeps contents: write for the rolling prerelease. That high is tracked in #313. Advisory failures stay tracked in #305–#311. The flaky audio folder scan stays tracked in #314.

Play input (PlayInput, FrameLatch, MouseMotion, Windows Confined, set_physical_key) is unchanged.

Test plan

  • cargo test --locked -p astraweave-core --test replay_hash
  • cargo test --locked -p aravath_runtime --lib replay_matches_golden_hash
  • cargo run -p aw_trace_sync -- --check
  • CI on the rebased branch, including Comprehensive CI and determinism-replay / compare for all eleven cases

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Security Considerations

  • Does this PR introduce new dependencies? No new crates.
  • Does this PR modify how user input is handled?
  • Does this PR change authentication or authorization mechanisms?
  • Does this PR access sensitive data or modify how it's stored? Hostile scar blobs with more than 4096 cells are rejected before insert. Image decodes stay capped.
  • Does this PR introduce new network communication or modify existing protocols?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot changed the title Aravath greybox: mineable world, movement, and sword combat Aravath demo: CC0 characters, streamed world, and sword combat Oct 13, 2026
cursor Bot pushed a commit that referenced this pull request Oct 14, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor cursor Bot mentioned this pull request Oct 15, 2026
12 of 20 tasks
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Drop the copied Fixed64, command, and voxel-DAG definitions. The column ring now calls astraweave-destruction. Demo chunks still fill from the island heightfield, and ColumnStream only decides which chunks stay loaded. The determinism job keeps the eleven main cases and adds worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
The PBR mesh fields landed on this branch after #205 constructed
CpuMesh. The five Aravath meshes now default the unused maps so the
greybox and replay jobs can compile.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Drop the copied Fixed64, command, and voxel-DAG definitions. The column ring now calls astraweave-destruction. Demo chunks still fill from the island heightfield, and ColumnStream only decides which chunks stay loaded. The determinism job keeps the eleven main cases and adds worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Drop the copied Fixed64, command, and voxel-DAG definitions. The column ring now calls astraweave-destruction. Demo chunks still fill from the island heightfield, and ColumnStream only decides which chunks stay loaded. The determinism job keeps the eleven main cases and adds worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 16, 2026
…215)

* docs(terrain): archaeology of worldgen, voxels, and scatter

Map the heightmap generator, the voxel path, and the Aravath greybox
against each other before any WS-RENDER-ENV-B feature work. Record
call sites, dormant stacks, the unmerged mesher, and a cross-OS hash
proposal. No runtime code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(terrain): integer forest columns, edge-keyed mesher, replay hash

The sim ground is column_gen: integer heights, a dirt road, and SimRng
scatter. DualContouring welds vertices by edge key. worldgen_columns is
a required three-OS replay case. Foliage upload is sorted, zone scatter
uses the world seed, and the pine-forest PBR set is hashed in the manifest.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs(assets): record the CC0 forest opening set

Add Poly Haven pine-forest ground, rocks, leaves, grass, trees, dry
branches, and the spruit_sunrise HDRI. The conifer is pine_tree_01
(CC0, polyhaven.com/a/pine_tree_01). KayKit stays the greybox props.
Photogrammetry mesh buffers are hashed and not vendored. No Unity
Asset Store files. Sky binding stays with PR #216.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(assets): game-ready LOD meshes for the forest plants

gltfpack 1.3 decimates the photogrammetry sources to LOD0 under 15k
triangles, plus LOD1, LOD2, and a KTX2 cross billboard. The commands
and output SHA-256 live in the manifest. The huge source buffers stay
build inputs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(terrain): one streamer, integer saved ground, drop dormant stacks

ColumnStream is the demo keep/evict set. Scene saves and the Aravath
checkpoint store the integer column record, with an erosion banner that
the preview is not the ground. PCG dungeons collapse through SeedRng.
Voxel materials bind through ModelSurfaceMaps. --frame-times writes a
CSV beside the exe. The unused heightmap loader, clipmap, GPU erosion,
voxel modifier, and second terrain save format are removed.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* test(terrain): re-lock E3 goldens and restore column LOD, workers, erosion

The seven lib failures were the retired pre-E3 contract. Persistence and
lacunarity tests force four octaves, matching PR #217, so debug and
release share the same bits. Worker column builds commit in (x, z) order.
Integer distance LOD and morph replace the heightmap LOD stack. Integer
droplets replace GPU erosion, and the editor Apply Erosion button writes
that bake. The deletion ledger records what each removed file did.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* test(terrain): stop ignoring the three lib tests

Scatter generation finishes immediately and runs with the suite.
The camera partition test loads one 32 m cell instead of meshing a
300 m neighborhood. Chunk coordinates round-trip while the f32 origin
is exact, and i32::MAX/2 is locked to the measured one-chunk miss.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(terrain): replay destruction commands on the column ring

Base columns stay the seed record. Apply Erosion appends a DestructionCommand log instead of replacing the snapshot. ColumnStream is the deformation slot set: a pre-sized ring, an in-place (x, z) sort, at most four DAG rebuilds per call, and no heap allocation on the tick.

Scatter ids come from (seed, x, z). A Detach in the log is not respawned. destruction_seam.rs is a temporary copy of the #243 command and DAG types, dropped on rebase onto feat/destruction.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(terrain): use main's destruction types after the #205 rebase

Drop the copied Fixed64, command, and voxel-DAG definitions. The column ring now calls astraweave-destruction. Demo chunks still fill from the island heightfield, and ColumnStream only decides which chunks stay loaded. The determinism job keeps the eleven main cases and adds worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* test(render): accept main's sky_equirect HDRI row

catalog_files_match_sha256 still hashes every row that publishes a sha256. sky_equirect is in the catalog and has no digest, so the test checks the name and path and does not require the png.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(ci): keep traversal cases beside the column replay hashes

The rebase left conflict markers in the determinism workflow and the terrain trace. The required set is main's cases, including traversal and traversal_deformed, plus worldgen_columns and deformed_chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* chore(lock): pin terrain and asset sha2 after the #325 rebase

Cargo resolved two sha2 versions. The terrain and asset packages stay on 0.10.9.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 16, 2026
Restack onto main cdea968. A connecting swing applies 40 - sword_hp
and marks cover broken. The Aravath golden stays 9b607d1a840ecd64.
This branch no longer vendors astraweave-destruction or the #205 tree.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 16, 2026
* docs: correct engine status against main at d6b07fc

The README and the status, build, and architecture pages it advertises
still described the June 2026 snapshot. Record 139 workspace members,
thirty traces, the ten required replay cases, and the systems that
landed with nav reroute, the Aravath bridge, security caps, the decision
inspector, causality, Rhai mods, destruction, and the slice QA replay.
Label greybox, weaving, traversal, local fluids, the frame budget, and
CI as in progress. State the 11 ms GTX 1660 Ti target as unmeasured.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(aw_doc_lint): fail the front door when status claims drift

Vocabulary matches stay in warn mode. The process now always fails if
README drops a required replay case, calls the 11 ms frame budget
measured, marks an open pull as shipped, or if player-facing docs use
the retired game title.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: record #316 image, glTF, and Ollama caps

Rebase onto main at 3971cbe, which includes #316 and the later #318
script tick fix. Image decode is capped at a 4096 edge and 64 MiB,
aw_asset_cli jails glTF file URIs, and Ollama constructors stay on
loopback unless allowing_remote is used. Gameplay scripts do not
receive physics or nav proxies.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: scripting demos no longer call physics or nav

advanced_ai.rhai now uses distance for sight and an empty patrol path.
scripting_playground keeps trigger damage and drops the player raycast.
The hosts still insert the resources.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: weaving is on main and is the eleventh replay case

Rebase onto 5cba174. #252 is no longer listed as in progress.
The required set is eleven cases, including weaving, which hashes
NullField until the local sim in #253. Workspace members are 140.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: the Aravath greybox is on main

Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: the claimed lockfile bumps were not applied

ARAVATH_DISTRIBUTION.md listed patched crate versions that Cargo.lock
does not contain. Record the locked versions, the tokio-rustls 0.25 and
openh264 ^0.6 pins, and issues #303 and #305-#311. The lockfile is unchanged.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: traversal is on main with two replay cases

Rebase onto a10780f. Required cases are thirteen, adding traversal
and traversal_deformed. The greybox golden is b663da52ea1d566e and
stays a Linux-and-Windows hash, not one of those thirteen.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: deny and audit pass after the supply-chain bumps

Rebase onto 8e5dd73. Record the locked patched versions, the ignored
advisories in #305-#311 and #320-#324, and the greybox tokio net edge
still tracked by #326. Cargo.lock is unchanged.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: fifteen replay cases after terrain columns landed

#215 is on main at d0452d3. The compare job requires
worldgen_columns and deformed_chunk beside the previous thirteen.
The greybox golden stays the island heightfield hash.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: CI burndown is on main and the greybox net fix is not

#217 at a66304d installs libudev for the editor tests and sanitizers,
gives audio tests a per-process fixture directory, and keeps the SPH
step finite. #219 and #256 are closed. #327 stays open for #326.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 16, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 17, 2026
#205 added the CC0 models as Git LFS and stored each blob sha256 in
ASSET_MANIFEST.tsv. The toolchain checkout left the pointer files in
the worktree, so the manifest check hashed the pointer for
AnimationLibrary_Godot_Standard.bin (c159f09f) instead of the blob
(6e65377d). The same missing blobs failed the clip and prop loads.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 17, 2026
#205 added the CC0 models as Git LFS and stored each blob sha256 in
ASSET_MANIFEST.tsv. The toolchain checkout left the pointer files in
the worktree, so the manifest check hashed the pointer for
AnimationLibrary_Godot_Standard.bin (c159f09f) instead of the blob
(6e65377d). The same missing blobs failed the clip and prop loads.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 17, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 17, 2026
#205 added the CC0 models as Git LFS and stored each blob sha256 in
ASSET_MANIFEST.tsv. The toolchain checkout left the pointer files in
the worktree, so the manifest check hashed the pointer for
AnimationLibrary_Godot_Standard.bin (c159f09f) instead of the blob
(6e65377d). The same missing blobs failed the clip and prop loads.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 17, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Oct 17, 2026
Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
lazyxeon added a commit that referenced this pull request Oct 18, 2026
)

* docs(ws-render-env-a): archaeology of renderer, sky, and camera

Map what is live, dormant, or duplicated, how the Aravath demo uses it,
and the Vulkan validation class outside PR #205. Phase 1 only; no feature code.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): drive time of day from the sim step

TimeOfDay no longer reads Instant. update(dt) and SkyRenderer::update
advance a fixed number of game hours, so the same tick sequence replays
the same sun.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): showcase IBL, full PBR maps, and startup validation

Bake spruit_sunrise (kloppenheim_02 fallback) at hello_companion startup.
Keep HDR radiance above 1 when downsampling. Fetch the missing CC0 plates
and record SHA-256. Extend ModelSurfaceMaps with occlusion and emissive,
and load glTF normal, metallic-roughness, occlusion, and emissive maps.
Submit the renderer's startup passes, including CloudShadowPass, under
wgpu validation on lavapipe and Windows.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): bake the terrain pack spruit_sunrise EXR

Point the showcase sky at assets/terrain/polyhaven/pine_forest/hdri/spruit_sunrise_2k.exr
instead of vendoring a second plate. The HDRI loader test writes a tiny
OpenEXR and checks that radiance above 1 stays a float image.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(ci): stop tracking pack HDRIs and install libudev for lavapipe

ci-guard rejects new files under assets/hdri/polyhaven. The catalog still
records their SHA-256 and checks the bytes when a checkout has them.
The lavapipe job needs libudev to build the renderer.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): upload full PBR maps for KayKit and Poly Haven GLBs

add_composite_model now builds ModelSurfaceMaps when a primitive carries
a normal, metallic-roughness, occlusion, or emissive image. Sibling
nor_gl and _arm files that share the model stem fill empty slots, and
ARM stays in glTF layout so the engine conversion runs once. Dormant
passes stay unwired; each deferral is a deferred-failure issue.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(ci): clear scorecard, the Windows SDK link, and TimeOfDay clippy

The new lavapipe workflow now sets contents: read and pins its actions.
The Windows C harness links ws2_32, userenv, and ntdll. TimeOfDay tests
construct the clock with TimeOfDay::new so clippy -D warnings no longer
flags field assignment after Default::default().

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs: plan the rendering architecture phase without building it

Record the user directives and the archaeology for bindless materials,
pipeline creation, compute particles, GPU culling, streaming, and
mutable meshes. The 11 ms budget is a 1660 Ti capture plus an
allocation gate, not a lavapipe timing claim.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): keep draw_into off the engine heap after warmup

Instance uploads and the visible-instance list reuse scratch buffers,
and identical uploads skip the GPU write. Profiler pass names are
static. A counting-allocator test records the remaining draw_into
traffic, which is wgpu-core's per-pass command list (about 110-113
on lavapipe). update_instances is zero once the list fits.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): create render pipelines through one helper

Forward, shadow, and skinned pipelines pass the device pipeline cache
when it exists. Water, IBL, sky, terrain, and the other production
creators call the same function with no cache, which is the fallback
when PIPELINE_CACHE is absent. A headless test covers that fallback.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): rewrite meshes in place when the deformation fits

Vertex and index buffers are COPY_DST. write_mesh copies a CPU mesh
into the existing GPU buffers when the counts fit, and only allocates
the next power-of-two size when they do not. The model AABB updates
with the write. A headless test deforms a quad twice without bumping
the storage generation, then grows it once.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): register bindless materials when the device allows it

The device requests the binding-array features only when the adapter
exposes them. PBR uploads then write a GpuMaterialEntry in engine
metallic-roughness layout. set_bindless_enabled(false) keeps the
group-3 bind groups and records no SSBO index. Shading still samples
group 3, so a missing feature does not change the frame.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): build one Hi-Z pyramid from the depth attachment

Copy Depth32Float with textureLoad into an R32Float mip chain and
downsample that copy. draw_into builds the pyramid on the first frame
and only dispatches after that. SSR and SSGI sample this texture. A
uniform clear stays uniform across a second build. CPU frustum remains
the draw filter and agrees with FrustumPlanes::test_aabb.

draw_into alloc samples after warmup: [219, 217, 217, 216, 217, 216]

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): simulate presentation particles from the caller seed

GpuParticleSystem::update emits into dead slots, then integrates with
the caller's seed and dt. draw_into runs that only when an emitter is
set and draws with the particle billboard pass. Depth is a
texture_depth_2d read with textureLoad. The readback fingerprint is
not part of the world hash.

draw_into alloc samples with no emitter: [219, 217, 217, 216, 217, 216]

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): stream albedo by camera distance from a fixed ring

TextureStreamingManager decodes on a tokio worker and tick uploads at
most one image per frame from a ring reserved up front. draw_into binds
the 1x1 fallback until the image is resident. A failed load is stored.
The fallback frame stays on the lavapipe recording floor.

draw_into alloc samples: [219, 217, 217, 216, 217, 216]
fallback frame: [219, 217, 217, 216]

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* test(render): require seed 9 to repeat, not only to differ from seed 7

The emit and update shaders have no atomics, and the particle buffers
are zero-filled at creation. Seed and dt are the only varying inputs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): explain the alloc jump and add the 1660 Ti capture command

The 110-120 floor became about 217 because the 64x64 Hi-Z pyramid
records six wgpu passes, and each pass allocates a command list. The
gate states that cause. gpu_frame_budget prints the median draw_into
time and does not decide 11 ms. GPU indirect culling stays planned
until the forward shader samples bindless.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* feat(render): gate atmosphere, clouds, SSGI, TAA, DoF, and upscale

Scene depth for those passes is texture_depth_2d read with textureLoad.
draw_into records them only after an explicit setter, so the default
frame stays inside the allocation gate. Volumetric fog and god rays
are not edited.

draw_into alloc samples with the gates off: [219, 217, 217, 216, 217, 216]

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* refactor(render): drop the fog stub, the second BRDF LUT, and weather_gpu

VolumetricFogNode recorded nothing. BrdfLutPass duplicated the
IblManager LUT. weather_gpu had no caller beside its own tests.
SkyPassNode still reserves the graph targets. weather_system and the
second CSM stay, because wiring them would fork live state.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): stop resolving timestamp queries that no pass wrote

draw_into reserved query slots for the cluster pass and every shadow
cascade, then skipped some of those passes. Vulkan resolve of that
range came back as zeros, so the 1660 Ti printout was 0.000 ms. Slots
are allocated only when the pass begins. A zero or negative duration
is rejected. The frame-budget tool prints the adapter and a heavy
scene of 64 instances plus a terrain chunk.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): return the streaming runtime error instead of expect

The library clippy gate denies expect. TextureStreamingManager::new now
returns Result, and the renderer propagates a failed decode runtime.
Timestamp checks reject NaN the same way they reject a non-positive span.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): keep GL and nested Tokio from failing the test jobs

GitHub's GL driver rejects textureLoad on depth, so Hi-Z stays off there
and the depth-load creation tests return. The decode runtime now lives on
its own thread, so dropping a streaming manager inside a Tokio test does
not block.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): report raw timestamp ticks and ignore empty passes

A 1660 Ti frame failed closed because one pass had equal begin and end
ticks, and that zero was stored as a duration. Equal non-zero ticks are
empty and stay out of the pass sum. Unwritten and inverted pairs still
fail, and the error prints the pass, both ticks, and the timestamp period.
draw_into also brackets the frame with encoder timestamps when the device
allows it. --debug-timestamps dumps the raw pairs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): drop the duplicate pbr_maps module and the second BRDF LUT

The rebase onto c798c9d kept main's BrdfLutPass file after this branch
had already stopped compiling it, and it declared pbr_maps twice.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): declare pbr_maps only once

The rebase onto c798c9d left both module declarations in lib.rs.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): copy timestamp queries in a second command buffer

Vulkan returns zeros for every slot, including the frame bracket, when
copy_buffer_to_buffer follows resolve_query_set in one encoder (wgpu#6406).
The staging copy is now a second command buffer in the same submit. A
self-test runs that path before the frame-budget samples and fails if any
pair is 0, 0. Lavapipe CI asserts the same readback is non-zero.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): resolve timestamps after the draw submission

draw_into splits one encoder into a Vulkan command buffer per pass.
Resolving in that same submission reads all zeros on NVIDIA, including
the frame bracket, while a one-pass self-test still succeeds. Wait for
the writes, then resolve, then copy. The heavy scene places one model
per instance so rendered_models matches the instance count.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): keep sky_equirect in the HDRI catalog

The rebase onto c798c9d kept the sha256 rows and dropped the
sky_equirect entry main's catalog test still requires.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): stop the timestamp resolve from deadlocking NVIDIA

Waiting for the draw and then resolving in a later submission leaves
VK_QUERY_RESULT_WAIT_BIT blocked on writes that are still queued, and
device.poll(Wait) does not return. Submit the resolve with the writes
and poll without blocking, failing after 5s with the wait point named.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): stamp draw_into with the self-test timestamp writes

Pass timestamp_writes were a second path from the encoder write_timestamp
that the 4060 self-test measured. draw_into now brackets each pass with
that same write, and the resolve stays in the same queue.submit. The
submission log records the query-set token, index, and submit id.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): log timestamp readback and add a fresh query set

The 4060 reads zeros from the reused frame query set while a fresh
self-test set is measured. Log the resolve buffer, the copy endpoints,
the mapped staging buffer, the map status, and the first 16 raw ticks.
--fresh-query-set replaces the set and both buffers before every frame.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): resolve timestamps on the encoder that wrote them

NVIDIA returns 0 when resolve_query_set is a second command buffer.
Record it on the write encoder, log encoder ids, and reject a split.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): print frame validation and a GPU execution word

A rejected command buffer leaves timestamp queries at zero. Log wgpu,
exit on an uncaptured error, pop per-frame scopes, and read back a
known word copied in that same encoder.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): sample particle depth without writing it in the same pass

The soft-particle pass bound scene depth and attached it for writing, so
wgpu dropped the frame. Keep the sample on a read-only attachment, and
fail the lavapipe heavy-scene test if that frame does not run.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): timestamp the passes inside the GPU frame bracket

Sky, water, atmosphere, bloom, Hi-Z, and particles were inside the frame
timestamp and outside the pass sum. Stamp them, and print that the 11 ms
clock is the GPU frame, not the CPU time spent waiting on it.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): name the GPU time between the frame passes

The unnamed 3 ms sits between the sky timestamp and the main pass.
Stamp that interval, and the empty stretches around the other passes,
so the frame remainder can fall under 0.2 ms.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* fix(render): stamp the cloud shadow march between sky and main

That span is the default-on 512² transmittance compute, not an IBL
rebake. The heavy scene still does not draw water.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* perf(render): cheapen the cloud shadow march

Hoist per-column coverage and wind out of the 32-step loop and march
16 steps. A 16-step bake matches the 32-step shadowed ground within one
8-bit level. Worley stays: a gradient-only stand-in does not. The map
stays rgba16float because R16Float is not a core storage format, and the
workgroup stays 8x8. Lavapipe frame 1 of the heavy scene drops from
4.485 ms to 3.138 ms for the full 512² dispatch.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* perf(render): amortize cloud shadows by sim frame

Each presentation frame writes 1/32 of the 512² map. The slice and the
cloud time come from the frame index, so the same index always selects
the same rows and the same time. A finished cycle matches a one-shot
bake. IblParams._pad holds that cycle's camera XZ, so the shadow stays
put between slices.

Lavapipe heavy scene, steady frame: cloud_shadow 0.189 ms, down from
4.485 ms for the full 32-step map. 1660 Ti estimate is
0.189 * 8.599/4.485 = 0.36 ms.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

* docs(render): record the 1660 Ti 11 ms pass

The heavy-scene GPU frame on a GTX 1660 Ti Max-Q at 939a21b is 3.688 ms,
down from 11.085 ms. budget_11ms is pass when median_gpu_frame_ms is at
most 11 and fail when it is over. The 4060 Ti heavy-scene frames stay
beside that record. Water stays out of the heavy scene (#371). GPU cull
stays the CPU frustum (#372).

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor cursor Bot mentioned this pull request Oct 22, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants