Vendor libra3assets (C++26 modules: BIG4, RefPack, BinaryAsset, CSF, CkMp map)
under third_party/ and add the ra3_assets target. ra3.fs, ra3.map and ra3.terrain
become thin adapters over it:
- ra3.fs delegates RefPack and the BIG4 index/payload reads (index-only, payloads
read on demand).
- ra3.map decodes ObjectsList and CSF via map_document/csf_table; starts come from
player_starts(), replacing the off-by-one whole-buffer scan.
- ra3.terrain takes the CkMp container and HeightMapData from map_document, with
BlendTileData (not modelled by the library) parsed from the chunk payload.
Adds an opt-in real-asset check (OPENRA3_TEST_ASSETS) plus the library's own unit
suite as ra3assets_unit.
Read the buildings and props a map places from its compiled art (the
uncompressed worldbuilder stream + embedded DDS textures):
- ra3.models: BAB asset-stream parser (lazy slices), W3DMesh + D3DHierarchy
decode, DDS (DXT1/3/5 + uncompressed) decode, per-mesh bone remap and
bind-pose single-joint skinning, flattened to one world-space triangle soup.
- ra3.map: parse the ObjectsList chunk into (type, x, y, z, angle).
- ra3.terrain: render3d rasterises the scene over the raymarched terrain with
a z-buffer; gpu_terrain carries the scene for the GPU backends.
- ra3.vulkan: second pipeline + depth attachment, terrain.frag writes
gl_FragDepth, and a small depth bias keeps ground decals from z-fighting.
- objects.fx shaders (compiled to SPIR-V), embedded like scene/terrain.
Only opaque parts are drawn: FX-light billboards (DefaultW3D.fx / BasicW3D.fx)
and damage-fill shells (BuildingsGenericDamageFill.fx) are skipped, since the
latter paint the wrecked interior (e.g. orange CBBuilding_Wood) over the shell.
Ground-decal meshes with no diffuse role and the Road templates themselves are
still not drawn.