feat(render3d): every shader variant as Vulkan SPIR-V, built ahead of time
Vulkan cannot compile GLSL when the game starts, so the programs render3d builds are listed (shaders/variants.list, 45 of them, collected with R3D_PROGRAMS_LOG across the self-tests, the screens, the viewpoints and the debug switches) and `ludic-dev shaders` compiles each into shaders/spv/<id>.vert.spv and .frag.spv with a manifest of what the backend needs: each stage's uniform block and member offsets, the samplers' bindings, the vertex inputs. The GLSL is the renderer's own, assembled as programs.ludic assembles it, through glslang's relaxed Vulkan mode, so gpu_uniform / u_* can write the same uniforms into a block on Vulkan. Bindings are assigned by the tool (glslang's own numbering put several samplers of one stage on binding 0): the vertex block is 0, the fragment block 1, samplers from 2 in name order, shared across both stages. Every stage passes spirv-val; `ludic-dev test` rebuilds and compares wherever the Vulkan SDK is installed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
bd79b276e9
commit
3fb1b7cd87
97 changed files with 2657 additions and 0 deletions
BIN
packages/ludic.render3d/shaders/spv/1fde9cd2.vert.spv
Normal file
BIN
packages/ludic.render3d/shaders/spv/1fde9cd2.vert.spv
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue