Repository navigation
Expand file tree
/
Copy pathcompile_gltf_all.bat
More file actions
141 lines (124 loc) · 9.84 KB
/
Copy pathcompile_gltf_all.bat
File metadata and controls
141 lines (124 loc) · 9.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@echo off
REM Compile all glTF PBR variants: hand-written, layered (all permutations), and bindless.
REM Uses --all-permutations to generate every feature combination automatically.
REM Uses --bindless to generate uber-shaders with bindless descriptor arrays.
REM Engines auto-select the correct permutation per material from the manifest.
echo ============================================================
echo glTF PBR — All Variants
echo ============================================================
echo.
REM --- Hand-written Forward ---
echo [1/7] Compiling hand-written Forward (gltf_pbr.lux)
python -m luxc examples/gltf_pbr.lux -o shadercache/
echo.
REM --- Hand-written RT ---
echo [2/7] Compiling hand-written RT (gltf_pbr_rt.lux)
python -m luxc examples/gltf_pbr_rt.lux -o shadercache/
echo.
REM --- Layered Forward: all permutations ---
echo [3/7] Compiling layered Forward (all permutations)
python -m luxc examples/gltf_pbr_layered.lux --pipeline GltfForward --all-permutations -o shadercache/
echo.
REM --- Layered RT: all permutations ---
echo [4/7] Compiling layered RT (all permutations)
python -m luxc examples/gltf_pbr_layered.lux --pipeline GltfRT --all-permutations -o shadercache/
echo.
REM --- Bindless Forward: single uber-shader ---
echo [5/7] Compiling bindless Forward (uber-shader)
python -m luxc examples/gltf_pbr_layered.lux --pipeline GltfForward --bindless -o shadercache/bindless/
echo.
REM --- Bindless RT: single uber-shader ---
echo [6/7] Compiling bindless RT (uber-shader)
python -m luxc examples/gltf_pbr_layered.lux --pipeline GltfRT --bindless -o shadercache/bindless/
echo.
REM --- Bindless Mesh: single uber-shader ---
echo [7/7] Compiling bindless Mesh (uber-shader)
python -m luxc examples/gltf_pbr_layered.lux --pipeline GltfMesh --bindless -o shadercache/bindless/
echo.
echo ============================================================
echo Rendering
echo ============================================================
echo.
REM Python renders (raster only)
REM With multi-pipeline support, engines auto-select permutations from manifest
echo --- Python engine: base models (raster) ---
python -m playground.engine --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr --output screenshots/test_gltf_forward_python.png --width 512 --height 512
python -m playground.engine --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr_layered --output screenshots/test_gltf_layered_forward_python.png --width 512 --height 512
echo.
REM Python renders: Khronos extension test models
if exist assets\ClearCoatTest.glb (
echo --- Python engine: Khronos extension test models ---
python -m playground.engine --scene assets/ClearCoatTest.glb --pipeline shadercache/gltf_pbr_layered --output screenshots/test_clearcoat_python.png --width 512 --height 512
python -m playground.engine --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --output screenshots/test_sheen_python.png --width 512 --height 512
python -m playground.engine --scene assets/TransmissionTest.glb --pipeline shadercache/gltf_pbr_layered --output screenshots/test_transmission_python.png --width 512 --height 512
echo.
)
REM C++ renders (raster + RT)
if exist playground_cpp\build\Release\lux-playground.exe (
echo --- C++ engine: base models, raster + RT ---
playground_cpp\build\Release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr --ibl pisa --output screenshots/test_gltf_forward_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr_rt --ibl pisa --output screenshots/test_gltf_rt_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_gltf_layered_forward_cpp.png --width 512 --height 512
if exist assets\ClearCoatTest.glb (
echo --- C++ engine: Khronos extension test models ---
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_sheen_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --mode rt --ibl pisa --output screenshots/test_sheen_rt_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --mode mesh --ibl pisa --output screenshots/test_sheen_mesh_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/TransmissionTest.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_transmission_cpp.png --width 512 --height 512
playground_cpp\build\Release\lux-playground.exe --scene assets/ClearCoatTest.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_clearcoat_cpp.png --width 512 --height 512
)
echo.
)
REM Rust renders (raster + RT)
if exist playground_rust\target\release\lux-playground.exe (
echo --- Rust engine: base models, raster + RT ---
playground_rust\target\release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr --ibl pisa --output screenshots/test_gltf_forward_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr_rt --ibl pisa --output screenshots/test_gltf_rt_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_gltf_layered_forward_rust.png --width 512 --height 512
if exist assets\ClearCoatTest.glb (
echo --- Rust engine: Khronos extension test models ---
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_sheen_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --mode rt --ibl pisa --output screenshots/test_sheen_rt_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/gltf_pbr_layered --mode mesh --ibl pisa --output screenshots/test_sheen_mesh_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/ClearCoatTest.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_clearcoat_rust.png --width 512 --height 512
playground_rust\target\release\lux-playground.exe --scene assets/TransmissionTest.glb --pipeline shadercache/gltf_pbr_layered --ibl pisa --output screenshots/test_transmission_rust.png --width 512 --height 512
)
echo.
)
REM ============================================================
REM Bindless rendering (C++ and Rust only — Python/wgpu lacks descriptor indexing)
REM ============================================================
echo.
echo ============================================================
echo Bindless Rendering
echo ============================================================
echo.
REM C++ bindless renders
if exist playground_cpp\build\Release\lux-playground.exe (
echo --- C++ engine: bindless raster ---
playground_cpp\build\Release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/bindless/gltf_pbr_layered --ibl pisa --output screenshots/test_bindless_raster_cpp.png --width 512 --height 512
if exist assets\SheenChair.glb (
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --ibl pisa --output screenshots/test_bindless_sheen_raster_cpp.png --width 512 --height 512
echo --- C++ engine: bindless RT ---
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --mode rt --ibl pisa --output screenshots/test_bindless_sheen_rt_cpp.png --width 512 --height 512
echo --- C++ engine: bindless mesh ---
playground_cpp\build\Release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --mode mesh --ibl pisa --output screenshots/test_bindless_sheen_mesh_cpp.png --width 512 --height 512
)
echo.
)
REM Rust bindless renders
if exist playground_rust\target\release\lux-playground.exe (
echo --- Rust engine: bindless raster ---
playground_rust\target\release\lux-playground.exe --scene assets/DamagedHelmet.glb --pipeline shadercache/bindless/gltf_pbr_layered --ibl pisa --output screenshots/test_bindless_raster_rust.png --width 512 --height 512
if exist assets\SheenChair.glb (
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --ibl pisa --output screenshots/test_bindless_sheen_raster_rust.png --width 512 --height 512
echo --- Rust engine: bindless RT ---
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --mode rt --ibl pisa --output screenshots/test_bindless_sheen_rt_rust.png --width 512 --height 512
echo --- Rust engine: bindless mesh ---
playground_rust\target\release\lux-playground.exe --scene assets/SheenChair.glb --pipeline shadercache/bindless/gltf_pbr_layered --mode mesh --ibl pisa --output screenshots/test_bindless_sheen_mesh_rust.png --width 512 --height 512
)
echo.
)
echo ============================================================
echo All done. Check screenshots/ for rendered PNGs.
echo ============================================================