upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/gameinput.cpp
diff options
context:
space:
mode:
authorzneel <14263028+zneel@users.noreply.github.com>2026-11-22 20:16:04 +0100
committerzneel <14263028+zneel@users.noreply.github.com>2026-11-22 23:30:06 +0100
commitb8c07f8ccfe866987a54ff52e0e0e9a050d2ac8a (patch)
treee36521241de0927aca478a3acd1173ca010ea744 /runtime/shims/gameinput.cpp
parenta3d682840fb2e2332b1f5ea40915d9a5fc25eac1 (diff)
XDXR builder: pair sibling triangles into TRI0/TRI1 leaves
A bottom-level build without ALLOW_UPDATE now pairs triangles, as the console builder does in its offline BLASes. The pass that writes the nodes above the leaves pairs a triangle with a later sibling (among that node's at most four children) that shares an edge in the opposite direction (the same vertex bits), from the same geometry, both active. The first triangle is rotated to put the shared edge in slots 1 -> 2, the sibling's third vertex goes in slot 3, its primitive in PrimitiveIndex2, and each node type's remap byte returns D3D12's barycentrics for its own vertex order. The node keeps one child per triangle with its own box, so the tree, the layout and the sizes do not change; the TRI1 child points at the first leaf and the sibling's leaf is left unused. Pairs never cross nodes: one thread owns each rewritten leaf and each parent-table entry. A refit rewrites the leaves one triangle each, so the layer does not pair builds with ALLOW_UPDATE (xdxr_pair), and record_blas ignores `pair` for updates. check-build now compares barycentrics as well as hits, and checks a case's "pairs" field: at least one TRI1 node, or none. New cases: paired grids (BOX32 and BOX16), a transform, a mixed scene, the radix path, and two that must not pair (pairs split across geometries, edges shared in the same direction), plus a D3D12 BLAS without ALLOW_UPDATE. Mutating the geometry or the direction rule, or the remap byte, fails check-build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/gameinput.cpp')
0 files changed, 0 insertions, 0 deletions