upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRafael <rafaelalvesp2005@gmail.com>2026-11-22 16:46:12 -0300
committerRafael <rafaelalvesp2005@gmail.com>2026-11-22 16:46:12 -0300
commit48cf8dbafbea665ba8d4ce3e1c8de7d5f6d22f8c (patch)
treede7bade5ec3d7744fc8c324083850c9a4bf62f8e /docs
parent49cad8812084a4cca1ed455c8b274f94adccf587 (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')
-rw-r--r--docs/models.md20
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
490So a material leads to its effect and that effect's ray-tracing resolve programs. The draw (VS/PS/MS) programs 491So a material leads to its effect. Through the carved compute names it reaches only 8 of the 18 hashes; the
491are not reachable through the carved programs' names, order or suffixes: 492effect records' own names reach all 18 (@jeremygold02, `tools/sgd5_effects.py` in #3036). The draw (VS/PS/MS)
493programs 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
535The group walk and its counts above were reproduced on a 1.0.2.1 copy (the same `shaders.rpf`, SHA-256 537The 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
537both 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
538matching technique table: 891 + 22 tables, 23,938 + 1,099 techniques and 27,536 + 1,262 passes. Until that 540technique table, 25,037 techniques and 28,798 passes. The census finds technique tables by a validated search
539census is reproduced, the format beyond these three records is reported rather than confirmed here: 541inside each effect, not by a decoded pointer. The record and pass format below was also checked by hand on
542three 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
547Two things are still open: 550Two 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