diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 16:46:12 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-22 16:46:12 -0300 |
| commit | 48cf8dbafbea665ba8d4ce3e1c8de7d5f6d22f8c (patch) | |
| tree | de7bade5ec3d7744fc8c324083850c9a4bf62f8e /docs/models.md | |
| parent | 49cad8812084a4cca1ed455c8b274f94adccf587 (diff) | |
docs/models.md: native effect records resolve all 18 material hashes; the effect census reproduced
With @jeremygold02's tools/sgd5_effects.py (#3036, 0029eba7) on the same
shaders.rpf: 932 effect records with distinct name hashes, 913 technique
tables, 25,037 techniques and 28,798 passes, and the data.rpf materials'
18 hashes (3,340 slots) each matching exactly one record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/models.md')
| -rw-r--r-- | docs/models.md | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/models.md b/docs/models.md index f6b453121..344697b8e 100644 --- a/docs/models.md +++ b/docs/models.md | |||
| @@ -486,9 +486,11 @@ file names), so the effect is recoverable from them. Measured on a 1.0.2.1 copy, | |||
| 486 | | Compute programs named `<effect>:<entry>` | 2,689 (every CS), 564 effects | | 486 | | Compute programs named `<effect>:<entry>` | 2,689 (every CS), 564 effects | |
| 487 | | Effects with `RaytracingResolve` CS programs | 341 (1,004 programs; 3 each for 324) | | 487 | | Effects with `RaytracingResolve` CS programs | 341 (1,004 programs; 3 each for 324) | |
| 488 | | Materials whose hash is the joaat of a carved effect name | 3,211 (96%), 8 of the 18 hashes | | 488 | | Materials whose hash is the joaat of a carved effect name | 3,211 (96%), 8 of the 18 hashes | |
| 489 | | Materials whose hash is the joaat of a native effect record's name (both SGD5 databases, below) | 3,340 (100%), 18 of the 18 hashes, one record each | | ||
| 489 | 490 | ||
| 490 | So a material leads to its effect and that effect's ray-tracing resolve programs. The draw (VS/PS/MS) programs | 491 | So a material leads to its effect. Through the carved compute names it reaches only 8 of the 18 hashes; the |
| 491 | are not reachable through the carved programs' names, order or suffixes: | 492 | effect records' own names reach all 18 (@jeremygold02, `tools/sgd5_effects.py` in #3036). The draw (VS/PS/MS) |
| 493 | programs are not reachable through the carved programs' names, order or suffixes: | ||
| 492 | 494 | ||
| 493 | - None of the 23,619 graphics programs (2,236 VS, 12,101 PS, 9,282 MS; the 195 GS are left out here) carries an | 495 | - None of the 23,619 graphics programs (2,236 VS, 12,101 PS, 9,282 MS; the 195 GS are left out here) carries an |
| 494 | effect name; they are named `<stage>_<technique or entry>_<8 hex>`. | 496 | effect name; they are named `<stage>_<technique or entry>_<8 hex>`. |
| @@ -533,10 +535,11 @@ are little-endian: | |||
| 533 | otherwise `stage_list[selector - 1]`. | 535 | otherwise `stage_list[selector - 1]`. |
| 534 | 536 | ||
| 535 | The group walk and its counts above were reproduced on a 1.0.2.1 copy (the same `shaders.rpf`, SHA-256 | 537 | The group walk and its counts above were reproduced on a 1.0.2.1 copy (the same `shaders.rpf`, SHA-256 |
| 536 | `0bc16345…`), and the record and pass format on the three records below. @jeremygold02 reports a census of | 538 | `0bc16345…`). So was @jeremygold02's census of both databases' effects with `tools/sgd5_effects.py |
| 537 | both databases' effects found by a validated search, with no per-effect offsets given. 913 effects have one | 539 | --list-effects` (#3036, `0029eba7`): 932 effect records with 932 distinct name hashes, 913 of them with a |
| 538 | matching technique table: 891 + 22 tables, 23,938 + 1,099 techniques and 27,536 + 1,262 passes. Until that | 540 | technique table, 25,037 techniques and 28,798 passes. The census finds technique tables by a validated search |
| 539 | census is reproduced, the format beyond these three records is reported rather than confirmed here: | 541 | inside each effect, not by a decoded pointer. The record and pass format below was also checked by hand on |
| 542 | three records: | ||
| 540 | 543 | ||
| 541 | | Record | Stage list sizes | Techniques | Passes (total = sum of counts) | First pass list 0 / list 1 ordinal | | 544 | | Record | Stage list sizes | Techniques | Passes (total = sum of counts) | First pass list 0 / list 1 ordinal | |
| 542 | |---|---|---:|---:|---| | 545 | |---|---|---:|---:|---| |
| @@ -546,9 +549,8 @@ census is reproduced, the format beyond these three records is reported rather t | |||
| 546 | 549 | ||
| 547 | Two things are still open: | 550 | Two things are still open: |
| 548 | 551 | ||
| 549 | - **Finding effect records in general.** The three were found by their offsets. The census locates technique | 552 | - **Decoding the pointers.** The census finds every effect's technique table by a validated search, not by a |
| 550 | tables by a validated search inside each effect, not by a decoded pointer, and the u32 after an effect's name | 553 | decoded pointer, and the u32 after an effect's name is still opaque. |
| 551 | is still opaque. | ||
| 552 | - **Which technique and pass the game draws with.** That is a run-time choice; it is presumably made in the | 554 | - **Which technique and pass the game draws with.** That is a run-time choice; it is presumably made in the |
| 553 | executable (RT-5). | 555 | executable (RT-5). |
| 554 | 556 | ||