Repository navigation
TEST-520: real-shader sandbox, placed props through a translated VS/PS pair - #3530
Joaovitor404silva wants to merge 1 commit into
Conversation
|
Tested on Windows 11 (MSVC 14.51, Python 3.13.1; head merged with main 4c52ce2). The merge conflicts in
|
|
Tested Windows 11 (26200), MSVC 14.50 (VS 2026), Ninja RelWithDebInfo. Two GPUs: Ryzen 7 9700X iGPU (RDNA2, AMD 32.0.21042.62) and RTX 3070 (NVIDIA 610.74), picked with
Not checked: AI-assisted; measured on my PC. |
vk_sandbox draws the props around a point with one translated game VS/PS pair chosen by signature and descriptor layout: a real camera through the VS constants, DiffuseTex albedo through the bindless set and the PS's own S#, depth, and a fly/walk/drive window. tools/sandbox.py packs the scene (tools/sandbox_scene.py), picks the pair and runs it; --check prints counts only. docs/sandbox.md has the table layout and the measurements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PiKMETzszqwfnV8QQyzocY
feee3e6 to
5a9a8a8
Compare
# Conflicts: # docs/README.md
|
Two things before this can land. (1) It breaks tests/test_docs_repo_paths.py — reproduced on the merged tree: docs/sandbox.md:11 cites |
Claimed in the coordination issue as: TEST-520 (claim)
What and why
The next steps of
docs/first_light.md§5: placed world props drawn by one of the game's own translated VS/PS pairs, with a real camera through the VS constants, the material's TTPF albedo through the bindless set, and the game's own sampler.runtime/test/vk_sandbox.cpp: draws every prop of a packed scene with the pair: vertex buffers (position, normal, UV), D32 depth, one indexed draw and one descriptor table per draw, raw V#s and T# in the heap, the T# words and the PS's S# literal in the descriptor hash table, and the sampler built from those S# words (gfx10::decode). Headless (--out) or a window with fly / walk / drive movement (walk and drive follow the scene's own triangles). It recreates the swapchain on resize and minimise.tools/sandbox_scene.py: packs the props around a point from the user's ownworld_index.py --entities-outrows,rpf9dump modelsmanifests andrpf9dump ttpftextures (stdlib only).tools/sandbox.py: picks the pair by what the shaders read, not by name: input signature, user SGPR 8 as a 32-bit pointer, bindings, and the descriptor loads in the listing (the material → program table is in the executable, docs/models.md: material shader hashes lead to effects; effect records select the draw programs #2519). Then it runsvk_sandbox.--checkrenders one frame and prints only counts (exit 0 / 1, 77 when the tool, pair or entities file is missing).docs/sandbox.md: the table layout the pair reads (offsets of the world rows, view-projection, light direction, colour, T#), how to reproduce, measurements and limits. Indexed fromdocs/README.md.Lighting stays the pair's own
max(0.25, n·l). Shadows and the deferred passes are out of scope (§6 of the doc).Tested
On an NVIDIA GeForce RTX 4070 Ti SUPER, driver 621.24, Windows 11, MSVC RelWithDebInfo build of
vk_sandbox, with the user's own 1.0.2.1 package:tools/sandbox.py --checkon onelevels.rpfwindow: 150 props, 446 draws, 442 textured (107 textures from the map and terrain TTPF pools): PASS, 114,503 of 230,400 pixels covered, 4,736 distinct colours (147 with no textures).--outexits 1.python -I tests/test_sandbox_pick.py(6 tests) andpython -I tests/test_sandbox_scene.py(6 tests): synthetic listings, indexes and meshes, no game data.python -m compileall -q tools tests.AI-assisted (Claude Code). All numbers above were measured on this machine.
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
https://claude.ai/code/session_01PiKMETzszqwfnV8QQyzocY