Skip to content

README: a status row for ray tracing and the BVH work (PROC-110) - #2108

Merged
ItsNotRexed merged 3 commits into
ItsNotRexed:mainfrom
wildheathen:docs/readme-rt-status
Nov 22, 2026
Merged

ItsNotRexed merged 3 commits into
ItsNotRexed:mainfrom
wildheathen:docs/readme-rt-status

Conversation

@wildheathen

Copy link
Copy Markdown
Contributor

PROC-110. Claim: #2078 (comment)

Depends on: #2034. The row's rehydration sentence refers to docs/bvh.md §4a, which that PR adds. If #2034 changes in review, this row follows it.

This adds the missing "Ray tracing (BVH)" row to the README's "Project status" table, after "Xbox D3D12 → Vulkan". The row says:

  • What works: BuildRaytracingAccelerationStructure builds BLASes and TLASes on the GPU in the console's XDXR BVH4 layout, and the translated shaders walk that layout themselves (TRI0/TRI1 leaves). LEONIDA_RT_AS=khr uses Vulkan's own acceleration structures instead (docs/bvh.md §7a).
  • Where the build descriptions come from: they are recovered from the package's XboxBvhBuilder.dll (docs/xdxr.md).
  • The game's packs: the *_bvh4.rpf packs are measured. They hold dehydrated BLASes that rehydrate through that DLL, with their geometry from the drawables in levels.rpf (docs/bvh.md, bvh.md: the dehydrated BLAS rehydrate, with their packing and source geometry (PROC-109) #2034).
  • Not done in the builder: TRI1 pairing, BOX16 nodes and serialization, as listed in §7a.
  • Open: whether the game rehydrates the packs or rebuilds them, and the XDXR-vs-KHR default (D3D12 → Vulkan layer: critical path, who builds what, open methods #313).

Testing: README only.

  • test_docs_links, test_docs_repo_paths and test_docs_list_items pass.
  • test_docs_design_rows fails as on main. The failure is in docs/README.md and two other docs pages, not in this file.

AI-assisted.

The status table had no row for acceleration structures. The new row covers the GPU builder in the console's XDXR BVH4 layout with the KHR alternative, the build descriptions recovered from XboxBvhBuilder.dll, the measured bvh4 packs and their rehydration, what the builder does not do yet, and the open questions tracked in ItsNotRexed#313.
@dcastell1

Copy link
Copy Markdown
Contributor

Code read + CPU tests, 9c721bb: pass (tests/test_docs_links.py → 5 passed).

@Jadiac5

Jadiac5 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Checked by reading. Every statement has a source on main: GPU builder docs/bvh.md:337, LEONIDA_RT_AS=khr docs/bvh.md:356, translator image_bvh_intersect_ray
docs/bvh.md:331, "Not done yet: pairing triangles into TRI1 leaves, BOX16 nodes, serialization" docs/bvh.md:380, descriptions recovered from the DLL docs/xdxr.md:5,
#313 is open. The row is placed after "Xbox D3D12 → Vulkan" as stated.

One concern: the sentence "offline-built, dehydrated BLASes that rehydrate through that DLL with their geometry from the drawables in levels.rpf" states as fact
what exists only in #2034, which is still open (its own text: 8 of 10 samples matched). The row does say "Open: whether the
game rehydrates the packs". Merge this after #2034, or soften to "measured on 8 of 10 samples". Otherwise no concerns.

Docs-only change; read against main at 4eb6155d, nothing was measured. AI-assisted (Claude Code).

@wildheathen

Copy link
Copy Markdown
Contributor Author

Thanks @Jadiac5, good catch. The PR already says Depends on: #2034, so the intended order is #2034 first. Even so, ce9cf80 makes the sentence self-contained: it now reads "…from the drawables in levels.rpf (measured on 8 of the 10 sampled BLAS; notes)", so the row stays accurate whichever lands first. test_docs_links and test_docs_repo_paths pass. AI-assisted.

@romainveurrier romainveurrier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D3D-178 owner here: thanks for adding the row, @wildheathen. Three things are out of date since #1789 and #1844 merged:

  1. "walk themselves (image_bvh_intersect_ray, TRI0/TRI1 leaves)": the translator reads all four triangle node types, TRI0–TRI3, with the barycentric remap byte (#1525). The GPU builder writes TRI0 leaves only.
  2. "Open: … the XDXR-vs-KHR default": that's decided. main builds XDXR records by default (#1667), and LEONIDA_RT_AS=khr keeps #743's path. The rehydrate-or-rebuild question is still open.
  3. Missing: PERFORM_UPDATE refits instead of rebuilding (#1789), and CopyRaytracingAccelerationStructure CLONE/COMPACT plus the COMPACTED_SIZE/CURRENT_SIZE postbuild values are implemented (#1844).

A suggestion for the first sentences, if useful:

⚠️ In progress. BuildRaytracingAccelerationStructure builds BLASes and TLASes on the GPU in the console's XDXR BVH4 layout (default; LEONIDA_RT_AS=khr uses Vulkan's own acceleration structures), which the translated shaders walk themselves through image_bvh_intersect_ray (all four triangle node types). Updates refit, and clone, compaction and the compacted/current postbuild sizes work; checked against a CPU reference on synthetic scenes (notes).

The rest of your row (the build descriptions, the measured packs and rehydration, "Not done in the builder", the rehydrate-or-rebuild question) reads right to me.

AI-assisted (Claude Code).

…or do now

Three corrections from @romainveurrier's review (the D3D-178 owner):

- the translator reads all four triangle node types, TRI0-TRI3, with the barycentric remap byte
  (ItsNotRexed#1525), while the GPU builder writes TRI0 leaves; the row said "TRI0/TRI1 leaves" for both;
- the XDXR-vs-KHR default is decided: the layer builds XDXR records by default and
  `LEONIDA_RT_AS=khr` keeps ItsNotRexed#743's path (ItsNotRexed#1667), so only the rehydrate-or-rebuild question is
  still open;
- the row now says that `PERFORM_UPDATE` refits instead of rebuilding (ItsNotRexed#1789), and that clone,
  compaction and the compacted/current postbuild sizes work (ItsNotRexed#1844), checked against the CPU
  reference on synthetic scenes.

The measured parts of the row (the recovered build descriptions, the packs, the 8 of 10 sampled
BLAS) are unchanged. Docs only: the documentation suites pass, with the same three duplicated-row
failures the parent commit has.
@wildheathen

Copy link
Copy Markdown
Contributor Author

Thanks @romainveurrier, all three are in, pushed as 5d915a1:

  1. the row now says the translated shaders walk the structure through image_bvh_intersect_ray all four triangle node types (TRI0-TRI3) with the barycentric remap byte, and that the GPU builder writes TRI0 leaves — so "TRI0/TRI1" no longer appears where it described both;
  2. the XDXR-vs-KHR default is out of the Open list: the row says XDXR is the default and LEONIDA_RT_AS=khr uses Vulkan's own structures, and only the rehydrate-or-rebuild question stays open;
  3. the row now says updates refit instead of rebuilding, and that clone, compaction and the compacted/current postbuild sizes work, checked against the CPU reference on synthetic scenes.

I took your suggested wording for the opening as it was, and kept the measured parts (the recovered build descriptions, the packs, the 8 of 10 sampled BLAS) unchanged. If anything in the new sentence overstates what you landed, say so and I will narrow it.

Docs only: test_docs_links.py, test_docs_list_items.py and test_docs_repo_paths.py pass; test_docs_design_rows.py has the same three duplicated-row failures as the parent commit (design.md, README.md, testing.md), which are PROC-106/PROC-97 territory, not this row.

AI-assisted.

ItsNotRexed added a commit that referenced this pull request Nov 22, 2026
@ItsNotRexed
ItsNotRexed merged commit 8068b86 into ItsNotRexed:main Nov 22, 2026
2 checks passed
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.

5 participants