diff options
| author | Nolan Cotter <186326284+NolanCotter@users.noreply.github.com> | 2026-11-22 20:39:59 -0700 |
|---|---|---|
| committer | Nolan Cotter <186326284+NolanCotter@users.noreply.github.com> | 2026-11-22 20:39:59 -0700 |
| commit | fa5f26db8eafd2cc27f627b68c0a5a5949bcf2ff (patch) | |
| tree | fc57e238be829295fc216dff89a6d93e64c16b50 /docs/first_light.md | |
| parent | 9b693ecd8a2f90799f6c47f8f06cf062feb9820c (diff) | |
| parent | 7b7d73f890f9fbbf5967bbb694390bbc99e33ba6 (diff) | |
Merge origin/main: DXGI device fields coexist with the console-ABI device state
Diffstat (limited to 'docs/first_light.md')
| -rw-r--r-- | docs/first_light.md | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/first_light.md b/docs/first_light.md index 6f15a134e..654665c6c 100644 --- a/docs/first_light.md +++ b/docs/first_light.md | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # First light: a real game model with its own translated shaders | 1 | # First light: a game model's UVs drawn with translated game shaders |
| 2 | 2 | ||
| 3 | **Status: measured** on the 1.0.2.1 package and an NVIDIA RTX 2060 SUPER (driver 620.73.04, Vulkan 1.4.357, | 3 | **Status: measured** on the 1.0.2.1 package and an NVIDIA RTX 2060 SUPER (driver 620.73.04, Vulkan 1.4.357, |
| 4 | CachyOS). This is the first draw of a real game model with its own translated VS and PS on a real GPU. The image | 4 | CachyOS). The fixture draws a model from the package with a vertex and pixel shader chosen to display its UVs. The image |
| 5 | stays in the user's work folder; this note records the counts and the recipe, not the model, the shaders or a | 5 | stays in the user's work folder; this note records the counts and the recipe, not the model, the shaders or a |
| 6 | screenshot. | 6 | screenshot. |
| 7 | 7 | ||
| @@ -21,6 +21,13 @@ The shaders are two ordinary containers from `shaders.rpf`, carved and translate | |||
| 21 | | VS | `128867d3233a97ba5b203c313a24ab8a77df20c2a308091a5595bb9f669677f4` | forwards POSITION and TEXCOORD from the vertex fetch to clip space and a varying | | 21 | | VS | `128867d3233a97ba5b203c313a24ab8a77df20c2a308091a5595bb9f669677f4` | forwards POSITION and TEXCOORD from the vertex fetch to clip space and a varying | |
| 22 | | PS | `ed4147a5f7514947c2eb8d79255bd80f72761ac1ba2205dd811d3e050cf1b495` | writes the interpolated TEXCOORD as the colour; no bindings, no texture | | 22 | | PS | `ed4147a5f7514947c2eb8d79255bd80f72761ac1ba2205dd811d3e050cf1b495` | writes the interpolated TEXCOORD as the colour; no bindings, no texture | |
| 23 | 23 | ||
| 24 | The model's authored shader assignment can be checked separately. In the model export manifest for the OBJ | ||
| 25 | above, `MeshShaders[0]` selects material slot 0, the only slot. Looking up its `Materials[0].Shader` in the | ||
| 26 | native shader database yields one effect with one technique and four compute-only passes. The VS and PS | ||
| 27 | in the table are the fixture's chosen pair. The model's use during gameplay remains unverified. | ||
| 28 | See the [effect lookup](https://github.com/ItsNotRexed/Leonida/pull/3036) and the | ||
| 29 | [Windows reproduction of the UV draw](https://github.com/ItsNotRexed/Leonida/pull/2893#issuecomment-7084947193). | ||
| 30 | |||
| 24 | Both disassemble with no invalid word, translate, and pass `spirv-val`; `tools/shader_link_check.py check` reports | 31 | Both disassemble with no invalid word, translate, and pass `spirv-val`; `tools/shader_link_check.py check` reports |
| 25 | the pair compatible. At 128×128 the draw covers **12,804 of 16,384 pixels (0.781)** and the centre pixel is | 32 | the pair compatible. At 128×128 the draw covers **12,804 of 16,384 pixels (0.781)** and the centre pixel is |
| 26 | `(0.498, 0.496, 0.0, 1.0)`: the model is the disc its geometry projects to, and the colour is its own UV map. The | 33 | `(0.498, 0.496, 0.0, 1.0)`: the model is the disc its geometry projects to, and the colour is its own UV map. The |
| @@ -71,6 +78,11 @@ indices), writes `manifest.json` with the counts and FSSM hashes, and runs `vk_h | |||
| 71 | other names from the carve index; `--no-fit` keeps a model that is already in NDC (the sky dome is). The test is | 78 | other names from the carve index; `--no-fit` keeps a model that is already in NDC (the sky dome is). The test is |
| 72 | package-gated: without `LEONIDA_FIRST_LIGHT_DIR` it skips, and it writes its image to that folder. | 79 | package-gated: without `LEONIDA_FIRST_LIGHT_DIR` it skips, and it writes its image to that folder. |
| 73 | 80 | ||
| 81 | Each run stages its pair in `<work>/first_light/dxbc` and translates it into `<work>/first_light/spirv`. Both folders | ||
| 82 | are removed at the start of a run, so they hold that run's two shaders and nothing an earlier run selected; do not | ||
| 83 | keep files there. The output folder (`first_light/out` or `--out`) and `<work>/shaders` are not emptied. If either | ||
| 84 | folder is a symlink or a junction, or a file in it cannot be removed, the run stops and names it. | ||
| 85 | |||
| 74 | ## 4. The harness mode | 86 | ## 4. The harness mode |
| 75 | 87 | ||
| 76 | `runtime/test/vk_harness.cpp` gained two environment options, inert when unset (the existing three-vertex and | 88 | `runtime/test/vk_harness.cpp` gained two environment options, inert when unset (the existing three-vertex and |