diff --git a/crates/gc-formats/src/tfrag.rs b/crates/gc-formats/src/tfrag.rs index 5bb47e0..29cfef5 100644 --- a/crates/gc-formats/src/tfrag.rs +++ b/crates/gc-formats/src/tfrag.rs @@ -40,8 +40,13 @@ //! minification filter, LOD bias), the per-vertex colours and the per-vertex //! light and normal records. //! -//! Not yet recovered: the LOD switch and morph rules in `TfragProc`, and the -//! texel data the texture table points into. See `docs/plan/tfrag.md`. +//! What is *not* claimed: that these rules match the original. The LOD switch +//! distances, the morph weight and the collapse edge are all **derived from the +//! data** -- tiers are classified from the four V4_8 parent arrays, and the +//! weight runs from zero to one across each tier's band -- but they have not +//! been checked against PCSX2 the way the lighting pass was. That check is the +//! outstanding item, and it needs a frame captured at a known view distance +//! rather than more disc-side measurement. use crate::buf::{Buf, Error, ErrorKind, Result}; diff --git a/docs/roadmap.md b/docs/roadmap.md index c72a392..f530b9e 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -238,9 +238,18 @@ Phase 1 hands over the extents; this phase works out what each one contains. `core_index.bin` and `gs_ram.bin` at fixed `u32` indices 1, 3 and 5 on every level checked. What follows the descriptor is still unknown. -- [~] `tfrag` — vertex format, topology, texture bindings, per-vertex colour - and normals, LOD selection and parent indices are all recovered and - verified. **Still open:** morph targets and the strip/chain bookkeeping. +- [x] `tfrag` — **complete on the disc side.** Vertex format, topology, strips + (`TfragStrip`), texture bindings, per-vertex colour and normals, LOD + selection, parent indices, morphing and collapse. 36 format tests, 9 texture + tests, 23 engine tests. The morphing is a blend toward the **parent + vertices'** midpoint, not toward separate morph targets — there are no + morph targets in this format, which is what the old "morph targets + unrecovered" note wrongly implied. +- [ ] What tfrag is **not** yet verified against is the original: the LOD switch + distances, morph weight and collapse edge are derived from the data (tiers + classified from the four V4_8 parent arrays, weight running zero to one + across each band), but have not been compared against PCSX2 the way the + lighting pass was. That needs a frame at a known view distance. - [x] `tie` — **fully chained.** `resolve_tie_class` walks both indirections: the class table is in `core_index.bin`, and the entry's `offset_in_asset_wad` addresses `core_data.bin` (not `core_data.wad`). All **1,864** tie classes