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:
authorNotRexed <therealnothingfn@gmail.com>2026-11-28 20:19:25 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-28 20:19:25 -0500
commit0a325350e4a9e58ca83ae43e886f4e6caa9955b5 (patch)
treed01b9a2addf39805658ade89d4e978b44139795d /docs
parent504ea0e418064d28ad33275f6e3c8eac5b37a9a8 (diff)
parent5825b02ff89bca1a2d1331d982818e3dbb74d597 (diff)
Merge origin/main into next
Diffstat (limited to 'docs')
-rw-r--r--docs/first_light.md29
1 files changed, 26 insertions, 3 deletions
diff --git a/docs/first_light.md b/docs/first_light.md
index c3cb2bf1d..b6ddd8bb3 100644
--- a/docs/first_light.md
+++ b/docs/first_light.md
@@ -201,13 +201,36 @@ python -I tools/first_light.py --game "<package>" --work ~/leonida-work \
201LEONIDA_FIRST_LIGHT_DIR=~/leonida-work/first_light/camera python -I tests/test_first_light.py -v 201LEONIDA_FIRST_LIGHT_DIR=~/leonida-work/first_light/camera python -I tests/test_first_light.py -v
202``` 202```
203 203
204### Through the Xbox D3D12 device
205
206Generate the reference with `--camera --run`. In PowerShell, set `$work` to the First Light workspace and
207`$build` to the CMake build directory, then point the section 5 CTest at the camera output.
208
209```powershell
210$env:LEONIDA_FIRST_LIGHT_DIR = Join-Path $work 'first_light/camera'
211ctest --test-dir $build -C RelWithDebInfo -R '^d3d12_first_light$' --output-on-failure -V
212```
213
214The fixture uploads the two matrices beside the mesh in a DEFAULT buffer. It creates two CBVs in slots 1 and 3
215of a shader-visible heap and binds that table with `SetGraphicsRootDescriptorTable`. The first graphics root dword
216occupies s8, placing the table in s9 as the VS expects. The CPU reference and `vk_harness` use a y-down viewport.
217The D3D12 draw negates the clip-Y column of the view-projection matrix so the same model point lands on the same
218pixel in both readbacks.
219
220On Windows 11 with an RTX 5070 Ti and NVIDIA 617.42, the section 1 model gave the following results at 128×128.
221Both views also passed with Vulkan synchronization validation enabled.
222
223| Camera yaw (pitch 25°, FOV 50°) | Covered pixels | Pixels bit-identical to `vk_harness` | CPU UV probes |
224|---|---:|---:|---:|
225| 30° | 6,851 | 16,384 / 16,384 | centre + 4 |
226| 55° | 6,846 | 16,384 / 16,384 | centre + 4 |
227
204## 8. Limits and next 228## 8. Limits and next
205 229
206* The camera draw (section 7) runs in `vk_harness` only. Through the D3D12 layer, s9 and the table it points at
207 have to come from root arguments, which `d3d12_first_light_test` does not set up yet.
208* `--camera` and `--dds` don't combine: the camera VS's table and the textured PS's T# both take s9 of the shared 230* `--camera` and `--dds` don't combine: the camera VS's table and the textured PS's T# both take s9 of the shared
209 push constants and heap VA 0x100, so `first_light.py` refuses the pair. A textured perspective draw needs a 231 push constants and heap VA 0x100, so `first_light.py` refuses the pair. A textured perspective draw needs a
210 second constant layout. 232 second constant layout.
211* One model and one draw. The `levels.rpf` windows have world props with POSITION/NORMAL/COLOUR/UV layouts that 233* One model and one draw. The `levels.rpf` windows have world props with POSITION/NORMAL/COLOUR/UV layouts that
212 match the `sga_dr_*`/`Rage_Transform*` families by signature; pairing one of those is the natural next image. 234 match the `sga_dr_*`/`Rage_Transform*` families by signature; pairing one of those is the natural next image.
213* The game still cannot boot: the executable is not in the package (RT-5), so no call site selects these programs. 235* First Light selects the model and the shader pair explicitly. For observations from the title's own render loop,
236 see the [Windows first-run UI](first_run_ui.md) and [story-load measurements](linux_proton.md).