# reference/ — archived from xrender-poc These docs come from **`xrender-poc`**, the bgfx-based rendering POC that was **retired on 2026-08-29** in favour of the Godot route (this repo). See [`../MIDREVIEW.md`](../MIDREVIEW.md) for the decision. They are kept because the reverse-engineering knowledge is route-independent and still authoritative: | file | what's still useful | |---|---| | `steps/M0-gr2-reader.md` | the entire `.gr2` v6/v7 format breakdown that `libgr2` implements — header, sections, Oodle1, self-describing type tree, `granny_transform`, `OldCurveType` B-splines, the "明确不做" table. **`libgr2` is vendored here now** (`../../libgr2`). | | `steps/00-oracle.md` | how the Wine + MinGW Granny oracle works — the ground truth for `libgr2` numeric verification. Oracle harness vendored at `../../oracle/`. | | `steps/M1-static-render.md` | material-binding chain (`granny_material` → `.Maps[].Map` → `granny_texture.FromFileName`), DDS/DXT decode, the bgfx-era gotchas. The material logic maps 1:1 onto `m2_material.cpp` here. | | `steps/M2-anim-skinning.md` | CPU LBS formula, `sample_pose` retarget-by-bone-name, the Granny normal-transform (plain 3×3, **no** inverse-transpose) — same math the GDExtension uses. Numeric gates vs Granny (≤6.5e-5). | | `steps/M3-mobile.md` | iOS/Android notes from the bgfx shells — historical; Godot handles platform now. | | `steps/M4-realistic-load.md` | eterpack / full-load plan — deferred in both routes. | | `PLAN.md` | the bgfx-route master plan. §01 (go/no-go criteria, "工程性延期 vs 方案性死路"), §05 (format findings), §07 (visual-diff layering) are still the shared vocabulary. | | `DEMO-PLAN.md` | bgfx RHI demo design record. Mostly superseded; kept for the shader/material-stage analysis. | **Relative paths inside these files** (`../libgr2`, `oracle/`, `test/golden/…`, `engine/…`, `app/…`) refer to the old xrender-poc layout. The mapping: | old (xrender-poc) | now (metin2-client; the repo was created as `mtgodot-poc` and renamed later — the `mtgodot-poc.app` / `.apk` artifact names and the `org.internal.mtgodotpoc` bundle id did **not** change) | |---|---| | `libgr2/` | `libgr2/` (vendored, unchanged) | | `formats/` | `formats/` (vendored) | | `oracle/` | `oracle/` (vendored; `oracle.exe` + `granny2_x64.dll` rebuilt locally) | | `tools/{gr2dump,gr2fuzz,oracle_diff}` | `tools/` (build with `-DMTGODOT_BUILD_TOOLS=ON`) | | `engine/`, `app/`, `platform/`, `third_party/` | **dropped** — Godot + the GDExtension in `extension/` replace them | | `test/golden/*.png` (bgfx shots) | `test/bgfx-reference/` (cross-check images) | | `test/{noise_floor,m2-numeric}.json`, `assets.list` | `test/` (vendored baselines) |