[P4-05] Skybox and image-based lighting (equirect import, irradiance + prefilter, BRDF LUT, IBL golden) (#229)

* parity: 103 HDR equirect import + GPU cubemap conversion (test + shader + header)

* parity: 103 split-sum BRDF LUT compute generation (header + shader + test)

* parity: 103 irradiance + prefilter + skybox/IBL integration (header + shaders + test)

* parity: 103 P4-05 chrome/rough IBL golden + notes + fail-closed GPU path

* parity: 103 fix irradiance storage view for MoltenVK (2D-array mip0 view)

* parity: 103 P4-05 review round — CodeRabbit/Sonar/macOS fixes + golden regen

* parity: 103 dedupe compute procs into GoldenVkProcs (Sonar duplication)

* parity: 103 share cube builder + compute procs in GoldenVkProcs (Sonar duplication)

* parity: 103 share compute device-open preamble (Sonar duplication)

* parity: 103 share mem pick+alloc in golden helper (Sonar duplication)

* parity: 103 share compute layout/begin/endread helpers (Sonar duplication)

* parity: 103 push 40B backing array (CodeRabbit OOB read)

* parity: 103 closeout note — all-green CI/Sonar/CodeRabbit

* parity: 103 resolve open CodeRabbit threads (ceil dispatch cover + seam budget note)

* parity: 103 notes for review-thread follow-up

---------

Co-authored-by: hermes-agent <hermes-agent@local>
Co-authored-by: vulkan-renderer <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-11-06 17:56:35 -05:00
1 parent 1d88bc42d2
commit 9090be1127
35 files changed
+8302 -55

No files matched your search

+237
View File
@@ -0,0 +1,237 @@
# P4-05 — Skybox and image-based lighting
## 2026-11-06 — BRDF LUT compute generation (t_20b358bd, vulkan-renderer)
- Gate: P4-04 (#102) merged via #221 (`41277e7`); `gh issue view 102` CLOSED.
Prompt §§2/7/8 + P4 slice read before coding.
- Added on branch `parity/p4-05-skybox-image-based-lighting-2`:
- `native/renderer/include/engine/renderer/brdf_lut.hpp` — CPU reference
(Hammersley/VdC, GGX importance sampling, Schlick-GGX Smith, split-sum
scale/bias split), import validate (default 512, bounds 16..2048),
texel-center convention (x = NdotV, y = roughness), and the PBR wiring
contract: `VK_FORMAT_R32G32_SFLOAT`, CLAMP_TO_EDGE + LINEAR, bindless
set-0 binding 6 (slots 0..5 taken by scene/material/textures/samplers/
visibility/lights/grid/index).
- `native/renderer/shaders/brdf_lut.comp` + checked-in `brdf_lut_spv.inc`
(both shader dirs) — 16x16 workgroups, 1024 Hammersley samples/texel,
push-constant lut_size; mirrors `BrdfIntegrate` term for term.
- `native/tests/test_brdf_lut.cpp` + `engine_brdf_lut` ctest — CPU curve
contract + 64px llvmpipe compute dispatch vs CPU ref.
- Results: `engine_brdf_lut` 45/45 PASS under
`SDL_VIDEO_DRIVER=offscreen ENGINE_REQUIRE_GPU=1` (worst GPU/CPU diff
2e-6); `engine_skybox_import` still green. Curve verified: smooth scale
monotonic in NdotV → ~1 at ndv~1, bias peaks at grazing, full-rough scale
falls with NdotV. No ABI change (no `engine_abi.h` touch).
- Gotchas hit: `embed_spv.py` confines both ends to the repo — compile the
`.spv` inside the tree, not `/tmp`. `golden_vk_helper.hpp` needs
`bindless_table.hpp`/`pbr_pipeline.hpp` included first (its
`GoldenDevice`/`GoldenOpenDevice` reference those types; the skybox TU
does this). My test's edge-spot check first probed the wrong corner
(x=62,y=63 is full-rough, scale~0.32 by design); corrected to the
smooth-normal corner (x=62,y=0 → ~(0.994, ~0)).
- Handoff to t_04b48e31: LUT storage is RG32F single-mip 2D; the sampled
view + actual `pbr_shade.slang` IBL wiring (irradiance/prefilter + LUT
sample) is yours — binding 6 is reserved, REPEAT-U/CLAMP-V stays on the
cubemap side only.
## 2026-11-06 — Irradiance + prefilter + skybox/IBL integration (t_04b48e31, vulkan-renderer)
- Prompt §§2/7/8 + P4 slice read before coding. P4-04 (#102) merged (#221, `4127e7e`).
- Added on branch `parity/p4-05-skybox-image-based-lighting-2`:
- `native/renderer/include/engine/renderer/skybox_ibl.hpp` — CPU IBL
surface: irradiance validate (default 32, bounds 8..128), prefilter
validate (default base 512, 10 mips, byte totals), mip<->roughness
mapping (mip0 = mirror, last = fully rough), IblBasis orthonormal
basis, IblIrradianceReference (cosine-weighted hemisphere mean * pi),
IblEvaluate split-sum reconstruction, SkyboxViewDir ray helper.
Frame-set sampled slots: irradiance = 7, prefilter = 8 (6 = BRDF LUT;
0..5 taken per pbr_shade.slang comment). No Vulkan objects, no SDK.
- `native/renderer/shaders/irradiance.comp` + `prefilter.comp` +
checked-in `_spv.inc` (both shader dirs) — irradiance: 512-sample
cosine hemisphere, E = pi * mean; prefilter: 1024-sample GGX
importance sampling, mip roughness = mip/(count-1). Both mirror the
CPU math term for term, 16x16x6 dispatches, RGBA32F storage cubes.
- `native/renderer/shaders/skybox.vert/frag` + checked-in `_spv.inc` —
fullscreen-triangle skybox (clip w = far plane), inv-view-rotation
push (36B) + exposure (must be 1.0 in tests); linear-HDR cubemap
sample, no tonemap (P4-02 does it at frame time).
- `native/renderer/shaders/ibl_shade.vert/frag` + checked-in `_spv.inc`
— TEST-ONLY split-sum evaluation (production PBR wiring lives in
`pbr_shade.slang`, slangc-gated): chrome disc left (metal 1, rough
0.05, albedo 1.0 silver F0) vs rough disc right (metal 0, rough 0.9,
albedo 0.5), analytic dome normals, skybox backdrop outside discs.
- `native/tests/test_skybox_ibl.cpp` + `engine_skybox_ibl` ctest — CPU
contract (26 checks) + llvmpipe compute (irradiance vs CPU ref,
prefilter mip0 vs source) + shade probes (chrome/rough/sky).
- Results: `engine_skybox_ibl` 69/69 PASS (26 CPU + 43 GPU) under
`SDL_VIDEO_DRIVER=offscreen ENGINE_REQUIRE_GPU=1`; irradiance worst
5.8e-4 (tol 0.15), prefilter-mip0 worst 8.6e-4 (tol 0.3); shade probes
chrome=(1.31,0.96,0.59) rough=(0.82,0.52,0.31), chrome HDR > 1.
`engine_skybox_import`, `engine_brdf_lut`, `engine_slang_pbr`,
`engine_pbr_materials`, `engine_pbr_golden` still green; no validation
errors; no ABI change (no `engine_abi.h` touch).
- Gotchas hit: shader compared `dot(n, vdir)` (incident ray) instead of
`dot(n, -vdir)` — chrome LUT lookup collapsed to ndv~0 and the mirror
went dark; fixed with an explicit PBR view vector `v = -vdir`. Test
upload maps host-visible memory mid-command-recording (before submit,
same pattern as the sibling TUs) — fine because the buffer is
host-coherent and the GPU only reads it after submit.
## 2026-11-06 — P4-05 golden + notes + [FAIL]-closed GPU path (t_d7b8095c, vulkan-renderer)
- Prompt §§2/7/8 + P4 slice read before coding. P4-04 (#102) merged (#221).
- Added on branch `parity/p4-05-skybox-image-based-lighting-2`:
- Golden `native/tests/golden/p4_05_ibl_chrome_rough_320x240.png` —
chrome (metal 1, rough 0.05, silver F0) left vs rough dielectric
(metal 0, rough 0.9, albedo 0.5) right under the analytic HDR sky,
skybox backdrop outside the discs. HDR shade target -> LDR via the
shared CPU tonemap (`HdrTonemapCpu`, mirrors `post_composite.frag`
term for term, no extra post pipeline) at EV 0, then
`golden_compare.hpp` P1-05. Vulkan origin is bottom-left: PNG row 0
is the top row.
- `native/tests/test_skybox_ibl.cpp`: LDR acceptance on the same bytes
the golden compares (chrome brighter than rough red-channel, chrome
lit > 40, no white clip); `[FAIL]`-not-`[SKIP]` wired through
`failures` (`ibl_gpu_missing` adds `GoldenGpuMissing` to the count
and returns 1, missing-device path returns 1 too — the old code
dropped the return, so `ENGINE_REQUIRE_GPU=1` with no device still
exited 0). `hdr_camera.hpp` + `golden_compare.hpp` includes.
- Results: `engine_skybox_ibl` all PASS under
`SDL_VIDEO_DRIVER=offscreen ENGINE_REQUIRE_GPU=1` (fresh golden
verified: re-run without `ENGINE_UPDATE_GOLDENS=1` ->
`[PASS] golden: p4_05_ibl_chrome_rough_320x240`); PNG spot-checks
`chrome(80,120)=(238,231,213)` `rough(240,120)=(226,207,179)`
`sky(160,4)=(250,240,193)` match `HdrTonemapCpu` math exactly.
Siblings green (`engine_skybox_import`, `engine_brdf_lut`,
`engine_slang_pbr`, `engine_pbr_materials`, `engine_pbr_golden`).
No validation errors; no ABI change (no `engine_abi.h` touch).
- Gotchas hit: `convert -format "%[pixel:p{80,120}]"` needs the braces
glued (`p{${xy}}` via shell var); a hand-rolled PNG IHDR parse lands
mid-chunk — trust `file(1)` + ImageMagick instead.
- Handoff: CI/PR packaging (green matrix, Sonar + CodeRabbit, real-GPU
check, `Closes #103` PR, `parity: 103 <summary>` commit) is the
remaining P4-05 closeout work.
## 2026-11-06 — P4-05 review round: CodeRabbit + Sonar + macOS golden (t_d7b8095c, vulkan-renderer)
- PR #229 CI state at round start: Linux clang+gcc + Windows + managed
all green; macOS `engine_skybox_ibl` FAILED on the golden
(`frac=0.0337`, 2590 px); Sonar Quality Gate failed (6.1% new-code
duplication > 3% limit, C reliability < A: 6x S2259 + 3x S3776).
- Root causes + fixes (all local-first, verified under
`SDL_VIDEO_DRIVER=offscreen ENGINE_REQUIRE_GPU=1` on lavapipe):
- CodeRabbit Major (`ibl_shade.frag:84`): shade sampled the prefilter
with implicit LOD while the view/sampler exposed all 6 mips but the
test filled only mip 0 — rough-sphere LOD reads hit uninitialized
mips (macOS/MoltenVK reads them differently than lavapipe, hence
the macOS-only golden drift). Fixed: `textureLod(u_pref, rdir,
rough * (levels-1))` (mirrors `PrefilterMipRoughness`), test
pre-pass fills every mip (per-mip storage views, one descriptor
set per mip — updating a set bound to a recording command buffer
is illegal, caught locally as a validation error), ceil-divided
group counts. `.frag` + both `_spv.inc` copies regenerated (1694
words), golden regenerated with `ENGINE_UPDATE_GOLDENS=1`.
- CodeRabbit Minor (viewport orientation): replaced the `px()` row
flip + positive-height viewport with a negative-height viewport
(`vp.y = kH`, `height = -kH`) so framebuffer row y == NDC row y;
PNG row 0 is the top framebuffer row with no flip. Note + comment
updated.
- CodeRabbit Minor (`irradiance.comp`, `prefilter.comp`,
`brdf_lut.comp` comments): dispatch docs now say ceil division
`((n+15)/16)` so tail edges < 16 texels stay covered (test used
only multiples of 16 before).
- CodeRabbit Minor (fail-closed GPU path): `test_brdf_lut.cpp` and
`test_skybox_import.cpp` missing-device branches returned 0 after
recording `[FAIL]` — now return 1 (`ENGINE_REQUIRE_GPU=1` fails,
optional-GPU skip preserved via `GoldenGpuMissing`).
- CodeRabbit Minor (proc gating): all three TUs now capture
`GoldenVkLoad` + `load_*_compute_procs` results, `check` both,
early-return 1 unless both resolve (`cmd_bind_pipe` included in
the coverage the review asked for).
- CodeRabbit Minor (skybox.frag Y convention): reviewed against the
code — no change needed. The `skybox.frag` path is not drawn in
this test (the golden draws `ibl_shade.frag`, which synthesizes
its own NDC `vec3(v, -1)` ray, not a skybox ray); with the
negative-height viewport the shade NDC convention is +Y-up and the
golden proves the orientation (`px()` flip removed). Recorded as
reviewed-no-change.
- CodeRabbit Minor (`test_skybox_import.cpp:726` filtering
precision): no code change — the 0.02 comparison tolerance
already absorbs the worst observed device filtering/math delta
(local worst 1e-4, two orders of magnitude inside the bound); the
test runs `ENGINE_REQUIRE_GPU=1` on every matrix lane including
MoltenVK, and `device_hint="llvmpipe"` is a preference, not a
restriction (device init falls back when the hint is absent).
Recorded as reviewed-no-change.
- CodeRabbit Minor (`irradiance_spv.inc` sync): reviewed against the
tree — all 8 P4-05 blobs are byte-identical across both dirs
(`cmp` clean); `shaders/README.md` now documents the two-copy
regeneration step so a future edit cannot half-update them.
Recorded as reviewed-no-change (docs fix).
- Sonar S2259 (6x null-function-pointer): the early `return 1`
unless `vk_ok && comp_ok` already proves non-null, but the
analyzer could not see it — added a documenting `assert` block
after each early return in all three TUs (needs `<cassert>`).
- Sonar S3776 (3x cognitive complexity in test `test_gpu()` fns):
test-only orchestration functions; complexity is linear setup
(no deep branching logic to extract without harming the
check-per-step readability the harness requires). Recorded as
reviewed-no-change (false positive for generated-style test
scaffolding).
- Sonar duplication 6.1%: the flagged blocks are the per-TU Vulkan
loader shims (`load_*_compute_procs`, device-init preambles),
which must stay per-TU (each TU links standalone, no shared test
lib). Recorded as reviewed-no-change (accepted duplication in
test scaffolding, same pattern as the existing sibling TUs).
- Results after fixes: `engine_skybox_ibl` all PASS (irradiance worst
5.8e-4, prefilter-mip0 worst 8.6e-4, chrome=(1.313,0.961,0.585)
rough=(0.821,0.516,0.310), `[PASS] golden:
p4_05_ibl_chrome_rough_320x240`); `engine_skybox_import`,
`engine_brdf_lut` all PASS. Validation clean except one benign
`WARNING-vkGetDeviceProcAddr-device` (loader shim probing an
instance proc via the device table, pre-existing pattern).
- Validation quirk found while fixing: push-constant range for the
shade layout was 36B but `IblShadePush` is 9 floats = 40B
(VUID-VkGraphicsPipelineCreateInfo-layout-10069 on lavapipe with
validation on; MoltenVK evidently tolerated it). Fixed to 40 in the
layout + `cmd_push` size.
## 2026-11-06 — P4-05 closeout: all-green CI + Sonar + CodeRabbit (t_d7b8095c, vulkan-renderer)
- PR #229 head `9c36cdd`: ALL matrix jobs green (Linux clang+gcc native,
macOS clang native, Windows MSVC native, managed x3 OS, player export
boot x3 OS), SonarCloud Quality Gate PASS (reliability A, duplication
2.69% < 3%), CodeQL pass, Analyze (C++) pass.
- macOS/MoltenVK lane caught two real bugs lavapipe tolerated: (1) the
implicit-LOD prefilter read of uninitialized mips 1..5 (macOS golden
frac=0.0337) — fixed with explicit `textureLod` + per-mip pre-pass;
(2) 36B push range vs 9-float (40B scalar tail) block — fixed to 40B
layout + `float[10]` backing. Both verified by the macOS lane going
green (7m21s / 7m5s).
- CodeRabbit: 13 inline threads, all resolved (10 fixed in-diff, 3
reviewed-no-change with code-checked reasons); replies on every
thread. PR body updated with final acceptance numbers
(chrome=(1.313,0.961,0.585) rough=(0.821,0.516,0.310)).
- Sonar: S2259 (6x) closed via documenting asserts; S3776/CPD handled
via shared helpers in `golden_vk_helper.hpp` (compute procs in
GoldenVkProcs, GoldenMakeCube, GoldenOpenComputeDevice,
GoldenPickMemory/AllocBind, compute layout/begin/endread) — the same
share-into-helper pattern P4-00 used (2c40b83/8e774fc/1cab3d9/599e0bf).
- Manual real-GPU note: lavapipe-only host; cross-vendor proof is the
green matrix (MoltenVK + MSVC + gcc/clang) pasted in the PR.
## 2026-11-06 — P4-05 review follow-up: 2 reopened threads resolved (vulkan-renderer)
- CodeRabbit follow-up on PR #229 flagged two gaps after the closeout:
(1) irradiance dispatch comment said ceil division but the test still
used `kIrr/16` — fixed: test now dispatches `(kIrr+15)/16` and a CPU
pin `test_cpu_dispatch_groups` covers edges 8->1, 32->2, 40->3;
(2) tolerance/portability thread on the 0.02 skybox-import bound —
answered with an in-code budget comment (observed worst ~1e-4 on
lavapipe + MoltenVK, ~200x margin; device_hint stays a preference).
- Local verify: `engine_skybox_ibl` all PASS (77 incl. 3 new dispatch
checks; irr worst 5.8e-4, pref-mip0 worst 8.6e-4, golden PASS),
`engine_skybox_import` PASS (worst 9.9e-5), `engine_brdf_lut` PASS —
all under `SDL_VIDEO_DRIVER=offscreen ENGINE_REQUIRE_GPU=1`.
- Commit `8e66d6a` pushed; both threads replied + resolved (0 unresolved).
CI re-running on the new head.
@@ -0,0 +1,201 @@
// brdf_lut.hpp — P4-05: split-sum BRDF LUT (Karis 2013) CPU reference.
//
// The LUT integrates the GGX geometry term and Schlick Fresnel over the
// hemisphere for one (NdotV, roughness) pair per texel:
//
// scale = int( F * G * VdH / (NdotV * NdotH) ) (F=1 part)
// bias = int( (1-F) * G * VdH / (NdotV * NdotH) ) (F=0 part)
//
// so the PBR shader can reconstruct specular IBL as
// F0 * scale + bias (times the prefiltered env sample).
//
// Layout contract (shared with brdf_lut.comp and test_brdf_lut.cpp):
// - 512x512 texels, R32G32_SFLOAT (R=scale, G=bias).
// - Texel (x = NdotV axis, y = roughness axis); texel centers:
// ndv = (x + 0.5) / size, rough = (y + 0.5) / size.
// - Import-time generated with the GPU compute shader; this header is
// the CPU reference the test compares against. No Vulkan objects here
// (compiles without the SDK, like hdr_camera.hpp).
//
// PBR wiring contract (coordinated with t_04b48e31 irradiance/prefilter):
// - Vulkan image format: VK_FORMAT_R32G32_SFLOAT (matched storage +
// sampled; RG32F storage-image write needs no extra feature).
// - Sampling: CLAMP_TO_EDGE in U and V, LINEAR filter.
// - Binding slot: bindless set binding 6 (set 0, binding 6) — free in
// the M3-02..M3-03 fixed set (0..5 taken: scene/material/textures/
// samplers/visibility/lights/grid/index — see bindless_table.hpp +
// pbr_shade.slang). The IBL sibling (t_04b48e31) owns irradiance +
// prefiltered cubemaps and the skybox/PBR integration; this card owns
// only the LUT generation + CPU reference + sampled-texture contract.
#pragma once
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
namespace engine::renderer {
// Default LUT edge in texels (spec P4-05 §6: 512).
inline constexpr std::uint32_t kBrdfLutSize = 512;
// Sane import bounds.
inline constexpr std::uint32_t kBrdfLutMin = 16;
inline constexpr std::uint32_t kBrdfLutMax = 2048;
// Importance-sample count used by both CPU ref and GPU shader.
inline constexpr std::uint32_t kBrdfLutSamples = 1024;
// Import parameters: LUT edge (0 = default kBrdfLutSize).
struct BrdfLutImportParams {
std::uint32_t lut_size{0};
};
// Validated import plan: resolved LUT edge. validate returns false (out
// untouched) on null out or edge outside [kBrdfLutMin, kBrdfLutMax].
struct BrdfLutImportPlan {
std::uint32_t lut_size{kBrdfLutSize};
std::uint64_t lut_bytes{0}; // edge^2 * 8 (RG32F: 2 floats)
};
[[nodiscard]] inline auto BrdfLutValidateImport(const BrdfLutImportParams& p,
BrdfLutImportPlan* out) noexcept
-> bool {
if (out == nullptr) {
return false;
}
const std::uint32_t edge = (p.lut_size != 0) ? p.lut_size : kBrdfLutSize;
if (edge < kBrdfLutMin || edge > kBrdfLutMax) {
return false;
}
out->lut_size = edge;
out->lut_bytes =
static_cast<std::uint64_t>(edge) * static_cast<std::uint64_t>(edge) * 8u;
return true;
}
// --- Split-sum integration -----------------------------------------------
// Hammersley low-discrepancy sequence (i/N, radical inverse base 2).
inline auto BrdfRadicalInverseVdC(std::uint32_t bits) noexcept -> float {
std::uint32_t reversed = bits;
reversed = ((reversed << 16) | (reversed >> 16));
reversed = (((reversed & 0x55555555u) << 1) | ((reversed & 0xAAAAAAAAu) >> 1));
reversed = (((reversed & 0x33333333u) << 2) | ((reversed & 0xCCCCCCCCu) >> 2));
reversed = (((reversed & 0x0F0F0F0Fu) << 4) | ((reversed & 0xF0F0F0F0u) >> 4));
reversed = (((reversed & 0x00FF00FFu) << 8) | ((reversed & 0xFF00FF00u) >> 8));
return static_cast<float>(reversed) * 2.3283064365386963e-10F;
}
inline auto BrdfHammersley(std::uint32_t i, std::uint32_t n,
float* u_out, float* v_out) noexcept -> void {
const float u = static_cast<float>(i) / static_cast<float>(n);
const float v = BrdfRadicalInverseVdC(i);
if (u_out != nullptr) {
*u_out = u;
}
if (v_out != nullptr) {
*v_out = v;
}
}
// GGX importance-sample direction for roughness a (= rough^2), N = +Z.
inline auto BrdfImportanceSampleGgx(float u, float v, float roughness,
float h[3]) noexcept -> void {
const float a = roughness * roughness;
const float a2 = a * a;
const float denom = 1.0F + (a2 - 1.0F) * v;
const float cos_theta =
(denom > 1e-7F) ? sqrtf((1.0F - v) / denom) : 1.0F;
constexpr float kPi = 3.141592653589793F;
const float phi = 2.0F * kPi * u;
const float sin_theta =
sqrtf(1.0F - (cos_theta < 1.0F ? cos_theta * cos_theta : 1.0F));
h[0] = sin_theta * cosf(phi);
h[1] = sin_theta * sinf(phi);
h[2] = cos_theta;
}
// Schlick-GGX geometry term (k = (rough+1)^2/8 remap, Epic's fit).
inline auto BrdfGeometrySchlickGgx(float n_dot_v, float roughness) noexcept
-> float {
const float r = roughness + 1.0F;
const float k = (r * r) / 8.0F;
const float denom = n_dot_v * (1.0F - k) + k;
return (denom > 1e-7F) ? n_dot_v / denom : 0.0F;
}
inline auto BrdfGeometrySmith(float n_dot_v, float n_dot_l,
float roughness) noexcept -> float {
return BrdfGeometrySchlickGgx(n_dot_v, roughness) *
BrdfGeometrySchlickGgx(n_dot_l, roughness);
}
// Integrate one (ndv, roughness) pair. sample_count 0 means the default
// kBrdfLutSamples. Out: scale (F=1 part), bias (F=0 part).
inline auto BrdfIntegrate(float ndv, float roughness,
std::uint32_t sample_count, float* scale_out,
float* bias_out) noexcept -> void {
const std::uint32_t n =
(sample_count != 0) ? sample_count : kBrdfLutSamples;
// View vector in the N=+Z frame (NdotV = ndv, grazing-safe clamp).
const float vx =
(ndv < 1.0F) ? sqrtf(1.0F - ndv * ndv) : 0.0F;
const float v[3] = {vx, 0.0F, (ndv < 0.0F ? 0.0F : ndv)};
float scale = 0.0F;
float bias = 0.0F;
for (std::uint32_t i = 0; i < n; ++i) {
float u = 0.0F;
float vv = 0.0F;
BrdfHammersley(i, n, &u, &vv);
float h[3] = {0.0F, 0.0F, 1.0F};
BrdfImportanceSampleGgx(u, vv, roughness, h);
const float vdoth = v[0] * h[0] + v[1] * h[1] + v[2] * h[2];
float l[3] = {2.0F * vdoth * h[0] - v[0], 2.0F * vdoth * h[1] - v[1],
2.0F * vdoth * h[2] - v[2]};
const float n_dot_l = (l[2] > 0.0F) ? l[2] : 0.0F;
if (n_dot_l > 0.0F) {
const float n_dot_h = (h[2] > 0.0F) ? h[2] : 0.0F;
if (n_dot_h > 0.0F && vdoth > 0.0F) {
const float g = BrdfGeometrySmith(ndv, n_dot_l, roughness);
const float g_vis = (g * vdoth) / ((n_dot_h * ndv) > 1e-7F
? (n_dot_h * ndv)
: 1e-7F);
const float fc = 1.0F - vdoth;
const float fc5 = fc * fc * fc * fc * fc;
scale += (1.0F - fc5) * g_vis;
bias += fc5 * g_vis;
}
}
}
if (scale_out != nullptr) {
*scale_out = scale / static_cast<float>(n);
}
if (bias_out != nullptr) {
*bias_out = bias / static_cast<float>(n);
}
}
// Texel-center inputs: x = NdotV axis, y = roughness axis.
inline auto BrdfLutTexelInputs(std::uint32_t x, std::uint32_t y,
std::uint32_t size, float* ndv_out,
float* rough_out) noexcept -> bool {
if (ndv_out == nullptr || rough_out == nullptr || size == 0) {
return false;
}
*ndv_out = (static_cast<float>(x) + 0.5F) / static_cast<float>(size);
*rough_out = (static_cast<float>(y) + 0.5F) / static_cast<float>(size);
return true;
}
// Reference LUT sample at texel (x, y) of a size-edge LUT.
inline auto BrdfLutReference(std::uint32_t x, std::uint32_t y,
std::uint32_t size, float* scale_out,
float* bias_out) noexcept -> bool {
float ndv = 0.0F;
float rough = 0.0F;
if (!BrdfLutTexelInputs(x, y, size, &ndv, &rough)) {
return false;
}
BrdfIntegrate(ndv, rough, kBrdfLutSamples, scale_out, bias_out);
return scale_out != nullptr && bias_out != nullptr;
}
} // namespace engine::renderer
@@ -0,0 +1,385 @@
// brdf_lut.spv — 2259 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -o brdf_lut.spv brdf_lut.comp
// then: python3 native/renderer/shaders/embed_spv.py brdf_lut.spv brdf_lut_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kBrdf_lutSpvWords = 2259u;
inline constexpr std::uint32_t kBrdf_lutSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x0000018fu, 0x00000000u, 0x00020011u,
0x00000001u, 0x00020011u, 0x00000031u, 0x0006000bu, 0x00000001u, 0x4c534c47u,
0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
0x0008000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000014bu,
0x00000155u, 0x0000017fu, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u,
0x00000010u, 0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u,
0x455f4c47u, 0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu,
0x00007475u, 0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u,
0x0000000bu, 0x69646172u, 0x5f6c6163u, 0x65766e69u, 0x5f657372u, 0x28636476u,
0x003b3175u, 0x00040005u, 0x0000000au, 0x73746962u, 0x00000000u, 0x00070005u,
0x00000011u, 0x6d6d6168u, 0x6c737265u, 0x75287965u, 0x31753b31u, 0x0000003bu,
0x00030005u, 0x0000000fu, 0x00000069u, 0x00030005u, 0x00000010u, 0x0000006eu,
0x000a0005u, 0x00000019u, 0x6f706d69u, 0x6e617472u, 0x735f6563u, 0x6c706d61u,
0x67675f65u, 0x66762878u, 0x31663b32u, 0x0000003bu, 0x00030005u, 0x00000017u,
0x00006978u, 0x00050005u, 0x00000018u, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00090005u, 0x0000001eu, 0x6d6f6567u, 0x79727465u, 0x6863735fu, 0x6b63696cu,
0x7867675fu, 0x3b316628u, 0x003b3166u, 0x00040005u, 0x0000001cu, 0x6f645f6eu,
0x00765f74u, 0x00050005u, 0x0000001du, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00090005u, 0x00000024u, 0x6d6f6567u, 0x79727465u, 0x696d735fu, 0x66286874u,
0x31663b31u, 0x3b31663bu, 0x00000000u, 0x00040005u, 0x00000021u, 0x6f645f6eu,
0x00765f74u, 0x00040005u, 0x00000022u, 0x6f645f6eu, 0x006c5f74u, 0x00050005u,
0x00000023u, 0x67756f72u, 0x73656e68u, 0x00000073u, 0x00080005u, 0x00000029u,
0x65746e69u, 0x74617267u, 0x72625f65u, 0x66286664u, 0x31663b31u, 0x0000003bu,
0x00030005u, 0x00000027u, 0x0076646eu, 0x00050005u, 0x00000028u, 0x67756f72u,
0x73656e68u, 0x00000073u, 0x00050005u, 0x0000002bu, 0x65766572u, 0x64657372u,
0x00000000u, 0x00040005u, 0x00000067u, 0x61726170u, 0x0000006du, 0x00030005u,
0x0000006du, 0x00000061u, 0x00030005u, 0x00000071u, 0x00003261u, 0x00040005u,
0x00000075u, 0x6f6e6564u, 0x0000006du, 0x00050005u, 0x0000007eu, 0x5f736f63u,
0x74656874u, 0x00000061u, 0x00030005u, 0x0000008eu, 0x00696870u, 0x00050005u,
0x00000094u, 0x5f6e6973u, 0x74656874u, 0x00000061u, 0x00030005u, 0x000000a8u,
0x00000072u, 0x00030005u, 0x000000abu, 0x0000006bu, 0x00040005u, 0x000000b1u,
0x6f6e6564u, 0x0000006du, 0x00040005u, 0x000000c4u, 0x61726170u, 0x0000006du,
0x00040005u, 0x000000c6u, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000c9u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000cbu, 0x61726170u, 0x0000006du,
0x00030005u, 0x000000d2u, 0x00000076u, 0x00040005u, 0x000000e3u, 0x6c616373u,
0x00000065u, 0x00040005u, 0x000000e4u, 0x73616962u, 0x00000000u, 0x00030005u,
0x000000e5u, 0x00000069u, 0x00030005u, 0x000000eeu, 0x00006978u, 0x00040005u,
0x000000efu, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000f1u, 0x61726170u,
0x0000006du, 0x00030005u, 0x000000f3u, 0x00000068u, 0x00040005u, 0x000000f4u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000f6u, 0x61726170u, 0x0000006du,
0x00030005u, 0x000000f9u, 0x0000006cu, 0x00040005u, 0x00000104u, 0x6f645f6eu,
0x006c5f74u, 0x00040005u, 0x0000010du, 0x6f645f6eu, 0x00685f74u, 0x00040005u,
0x00000111u, 0x746f6476u, 0x00000068u, 0x00030005u, 0x0000011du, 0x00000067u,
0x00040005u, 0x0000011eu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000120u,
0x61726170u, 0x0000006du, 0x00040005u, 0x00000122u, 0x61726170u, 0x0000006du,
0x00040005u, 0x00000125u, 0x69765f67u, 0x00000073u, 0x00030005u, 0x0000012eu,
0x00006366u, 0x00030005u, 0x00000148u, 0x00000078u, 0x00080005u, 0x0000014bu,
0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u,
0x00030005u, 0x0000014fu, 0x00000079u, 0x00040005u, 0x00000153u, 0x5074754cu,
0x00687375u, 0x00060006u, 0x00000153u, 0x00000000u, 0x5f74756cu, 0x657a6973u,
0x00000000u, 0x00040005u, 0x00000155u, 0x75705f67u, 0x00006873u, 0x00030005u,
0x00000166u, 0x0076646eu, 0x00040005u, 0x0000016fu, 0x67756f72u, 0x00000068u,
0x00030005u, 0x00000177u, 0x0074756cu, 0x00040005u, 0x00000178u, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000017au, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000017fu, 0x756c5f75u, 0x00000074u, 0x00040047u, 0x0000014bu, 0x0000000bu,
0x0000001cu, 0x00030047u, 0x00000153u, 0x00000002u, 0x00050048u, 0x00000153u,
0x00000000u, 0x00000023u, 0x00000000u, 0x00030047u, 0x0000017fu, 0x00000019u,
0x00040047u, 0x0000017fu, 0x00000021u, 0x00000001u, 0x00040047u, 0x0000017fu,
0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u,
0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u,
0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u, 0x00000008u, 0x00000020u,
0x00040021u, 0x00000009u, 0x00000008u, 0x00000007u, 0x00040017u, 0x0000000du,
0x00000008u, 0x00000002u, 0x00050021u, 0x0000000eu, 0x0000000du, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000013u, 0x00000007u, 0x0000000du, 0x00040020u,
0x00000014u, 0x00000007u, 0x00000008u, 0x00040017u, 0x00000015u, 0x00000008u,
0x00000003u, 0x00050021u, 0x00000016u, 0x00000015u, 0x00000013u, 0x00000014u,
0x00050021u, 0x0000001bu, 0x00000008u, 0x00000014u, 0x00000014u, 0x00060021u,
0x00000020u, 0x00000008u, 0x00000014u, 0x00000014u, 0x00000014u, 0x00050021u,
0x00000026u, 0x0000000du, 0x00000014u, 0x00000014u, 0x00040015u, 0x0000002eu,
0x00000020u, 0x00000001u, 0x0004002bu, 0x0000002eu, 0x0000002fu, 0x00000010u,
0x0004002bu, 0x00000006u, 0x00000035u, 0x55555555u, 0x0004002bu, 0x0000002eu,
0x00000037u, 0x00000001u, 0x0004002bu, 0x00000006u, 0x0000003au, 0xaaaaaaaau,
0x0004002bu, 0x00000006u, 0x0000003fu, 0x33333333u, 0x0004002bu, 0x0000002eu,
0x00000041u, 0x00000002u, 0x0004002bu, 0x00000006u, 0x00000044u, 0xccccccccu,
0x0004002bu, 0x00000006u, 0x00000049u, 0x0f0f0f0fu, 0x0004002bu, 0x0000002eu,
0x0000004bu, 0x00000004u, 0x0004002bu, 0x00000006u, 0x0000004eu, 0xf0f0f0f0u,
0x0004002bu, 0x00000006u, 0x00000053u, 0x00ff00ffu, 0x0004002bu, 0x0000002eu,
0x00000055u, 0x00000008u, 0x0004002bu, 0x00000006u, 0x00000058u, 0xff00ff00u,
0x0004002bu, 0x00000008u, 0x0000005eu, 0x2f800000u, 0x0004002bu, 0x00000008u,
0x00000076u, 0x3f800000u, 0x0004002bu, 0x00000006u, 0x00000079u, 0x00000001u,
0x0004002bu, 0x00000008u, 0x00000080u, 0x33d6bf95u, 0x00020014u, 0x00000081u,
0x0004002bu, 0x00000008u, 0x0000008fu, 0x40c90fdbu, 0x0004002bu, 0x00000006u,
0x00000090u, 0x00000000u, 0x0004002bu, 0x00000008u, 0x00000099u, 0x00000000u,
0x0004002bu, 0x00000008u, 0x000000afu, 0x41000000u, 0x00040020u, 0x000000d1u,
0x00000007u, 0x00000015u, 0x0004002bu, 0x00000006u, 0x000000ecu, 0x00000400u,
0x0004002bu, 0x00000008u, 0x000000fau, 0x40000000u, 0x0004002bu, 0x00000006u,
0x00000105u, 0x00000002u, 0x0004002bu, 0x00000008u, 0x00000131u, 0x40a00000u,
0x0004002bu, 0x00000008u, 0x00000143u, 0x44800000u, 0x00040017u, 0x00000149u,
0x00000006u, 0x00000003u, 0x00040020u, 0x0000014au, 0x00000001u, 0x00000149u,
0x0004003bu, 0x0000014au, 0x0000014bu, 0x00000001u, 0x00040020u, 0x0000014cu,
0x00000001u, 0x00000006u, 0x0003001eu, 0x00000153u, 0x00000006u, 0x00040020u,
0x00000154u, 0x00000009u, 0x00000153u, 0x0004003bu, 0x00000154u, 0x00000155u,
0x00000009u, 0x0004002bu, 0x0000002eu, 0x00000156u, 0x00000000u, 0x00040020u,
0x00000157u, 0x00000009u, 0x00000006u, 0x0004002bu, 0x00000008u, 0x00000169u,
0x3f000000u, 0x00090019u, 0x0000017du, 0x00000008u, 0x00000001u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000002u, 0x00000006u, 0x00040020u, 0x0000017eu,
0x00000000u, 0x0000017du, 0x0004003bu, 0x0000017eu, 0x0000017fu, 0x00000000u,
0x00040017u, 0x00000185u, 0x0000002eu, 0x00000002u, 0x00040017u, 0x0000018bu,
0x00000008u, 0x00000004u, 0x0004002bu, 0x00000006u, 0x0000018du, 0x00000010u,
0x0006002cu, 0x00000149u, 0x0000018eu, 0x0000018du, 0x0000018du, 0x00000079u,
0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u,
0x00000005u, 0x0004003bu, 0x00000007u, 0x00000148u, 0x00000007u, 0x0004003bu,
0x00000007u, 0x0000014fu, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000166u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x0000016fu, 0x00000007u, 0x0004003bu,
0x00000013u, 0x00000177u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000178u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x0000017au, 0x00000007u, 0x00050041u,
0x0000014cu, 0x0000014du, 0x0000014bu, 0x00000090u, 0x0004003du, 0x00000006u,
0x0000014eu, 0x0000014du, 0x0003003eu, 0x00000148u, 0x0000014eu, 0x00050041u,
0x0000014cu, 0x00000150u, 0x0000014bu, 0x00000079u, 0x0004003du, 0x00000006u,
0x00000151u, 0x00000150u, 0x0003003eu, 0x0000014fu, 0x00000151u, 0x0004003du,
0x00000006u, 0x00000152u, 0x00000148u, 0x00050041u, 0x00000157u, 0x00000158u,
0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000159u, 0x00000158u,
0x000500aeu, 0x00000081u, 0x0000015au, 0x00000152u, 0x00000159u, 0x000400a8u,
0x00000081u, 0x0000015bu, 0x0000015au, 0x000300f7u, 0x0000015du, 0x00000000u,
0x000400fau, 0x0000015bu, 0x0000015cu, 0x0000015du, 0x000200f8u, 0x0000015cu,
0x0004003du, 0x00000006u, 0x0000015eu, 0x0000014fu, 0x00050041u, 0x00000157u,
0x0000015fu, 0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000160u,
0x0000015fu, 0x000500aeu, 0x00000081u, 0x00000161u, 0x0000015eu, 0x00000160u,
0x000200f9u, 0x0000015du, 0x000200f8u, 0x0000015du, 0x000700f5u, 0x00000081u,
0x00000162u, 0x0000015au, 0x00000005u, 0x00000161u, 0x0000015cu, 0x000300f7u,
0x00000164u, 0x00000000u, 0x000400fau, 0x00000162u, 0x00000163u, 0x00000164u,
0x000200f8u, 0x00000163u, 0x000100fdu, 0x000200f8u, 0x00000164u, 0x0004003du,
0x00000006u, 0x00000167u, 0x00000148u, 0x00040070u, 0x00000008u, 0x00000168u,
0x00000167u, 0x00050081u, 0x00000008u, 0x0000016au, 0x00000168u, 0x00000169u,
0x00050041u, 0x00000157u, 0x0000016bu, 0x00000155u, 0x00000156u, 0x0004003du,
0x00000006u, 0x0000016cu, 0x0000016bu, 0x00040070u, 0x00000008u, 0x0000016du,
0x0000016cu, 0x00050088u, 0x00000008u, 0x0000016eu, 0x0000016au, 0x0000016du,
0x0003003eu, 0x00000166u, 0x0000016eu, 0x0004003du, 0x00000006u, 0x00000170u,
0x0000014fu, 0x00040070u, 0x00000008u, 0x00000171u, 0x00000170u, 0x00050081u,
0x00000008u, 0x00000172u, 0x00000171u, 0x00000169u, 0x00050041u, 0x00000157u,
0x00000173u, 0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000174u,
0x00000173u, 0x00040070u, 0x00000008u, 0x00000175u, 0x00000174u, 0x00050088u,
0x00000008u, 0x00000176u, 0x00000172u, 0x00000175u, 0x0003003eu, 0x0000016fu,
0x00000176u, 0x0004003du, 0x00000008u, 0x00000179u, 0x00000166u, 0x0003003eu,
0x00000178u, 0x00000179u, 0x0004003du, 0x00000008u, 0x0000017bu, 0x0000016fu,
0x0003003eu, 0x0000017au, 0x0000017bu, 0x00060039u, 0x0000000du, 0x0000017cu,
0x00000029u, 0x00000178u, 0x0000017au, 0x0003003eu, 0x00000177u, 0x0000017cu,
0x0004003du, 0x0000017du, 0x00000180u, 0x0000017fu, 0x0004003du, 0x00000006u,
0x00000181u, 0x00000148u, 0x0004007cu, 0x0000002eu, 0x00000182u, 0x00000181u,
0x0004003du, 0x00000006u, 0x00000183u, 0x0000014fu, 0x0004007cu, 0x0000002eu,
0x00000184u, 0x00000183u, 0x00050050u, 0x00000185u, 0x00000186u, 0x00000182u,
0x00000184u, 0x00050041u, 0x00000014u, 0x00000187u, 0x00000177u, 0x00000090u,
0x0004003du, 0x00000008u, 0x00000188u, 0x00000187u, 0x00050041u, 0x00000014u,
0x00000189u, 0x00000177u, 0x00000079u, 0x0004003du, 0x00000008u, 0x0000018au,
0x00000189u, 0x00070050u, 0x0000018bu, 0x0000018cu, 0x00000188u, 0x0000018au,
0x00000099u, 0x00000076u, 0x00040063u, 0x00000180u, 0x00000186u, 0x0000018cu,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000008u, 0x0000000bu, 0x00000000u,
0x00000009u, 0x00030037u, 0x00000007u, 0x0000000au, 0x000200f8u, 0x0000000cu,
0x0004003bu, 0x00000007u, 0x0000002bu, 0x00000007u, 0x0004003du, 0x00000006u,
0x0000002cu, 0x0000000au, 0x0003003eu, 0x0000002bu, 0x0000002cu, 0x0004003du,
0x00000006u, 0x0000002du, 0x0000002bu, 0x000500c4u, 0x00000006u, 0x00000030u,
0x0000002du, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000031u, 0x0000002bu,
0x000500c2u, 0x00000006u, 0x00000032u, 0x00000031u, 0x0000002fu, 0x000500c5u,
0x00000006u, 0x00000033u, 0x00000030u, 0x00000032u, 0x0003003eu, 0x0000002bu,
0x00000033u, 0x0004003du, 0x00000006u, 0x00000034u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000036u, 0x00000034u, 0x00000035u, 0x000500c4u, 0x00000006u,
0x00000038u, 0x00000036u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000039u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x0000003bu, 0x00000039u, 0x0000003au,
0x000500c2u, 0x00000006u, 0x0000003cu, 0x0000003bu, 0x00000037u, 0x000500c5u,
0x00000006u, 0x0000003du, 0x00000038u, 0x0000003cu, 0x0003003eu, 0x0000002bu,
0x0000003du, 0x0004003du, 0x00000006u, 0x0000003eu, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000040u, 0x0000003eu, 0x0000003fu, 0x000500c4u, 0x00000006u,
0x00000042u, 0x00000040u, 0x00000041u, 0x0004003du, 0x00000006u, 0x00000043u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x00000045u, 0x00000043u, 0x00000044u,
0x000500c2u, 0x00000006u, 0x00000046u, 0x00000045u, 0x00000041u, 0x000500c5u,
0x00000006u, 0x00000047u, 0x00000042u, 0x00000046u, 0x0003003eu, 0x0000002bu,
0x00000047u, 0x0004003du, 0x00000006u, 0x00000048u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x0000004au, 0x00000048u, 0x00000049u, 0x000500c4u, 0x00000006u,
0x0000004cu, 0x0000004au, 0x0000004bu, 0x0004003du, 0x00000006u, 0x0000004du,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x0000004fu, 0x0000004du, 0x0000004eu,
0x000500c2u, 0x00000006u, 0x00000050u, 0x0000004fu, 0x0000004bu, 0x000500c5u,
0x00000006u, 0x00000051u, 0x0000004cu, 0x00000050u, 0x0003003eu, 0x0000002bu,
0x00000051u, 0x0004003du, 0x00000006u, 0x00000052u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000054u, 0x00000052u, 0x00000053u, 0x000500c4u, 0x00000006u,
0x00000056u, 0x00000054u, 0x00000055u, 0x0004003du, 0x00000006u, 0x00000057u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x00000059u, 0x00000057u, 0x00000058u,
0x000500c2u, 0x00000006u, 0x0000005au, 0x00000059u, 0x00000055u, 0x000500c5u,
0x00000006u, 0x0000005bu, 0x00000056u, 0x0000005au, 0x0003003eu, 0x0000002bu,
0x0000005bu, 0x0004003du, 0x00000006u, 0x0000005cu, 0x0000002bu, 0x00040070u,
0x00000008u, 0x0000005du, 0x0000005cu, 0x00050085u, 0x00000008u, 0x0000005fu,
0x0000005du, 0x0000005eu, 0x000200feu, 0x0000005fu, 0x00010038u, 0x00050036u,
0x0000000du, 0x00000011u, 0x00000000u, 0x0000000eu, 0x00030037u, 0x00000007u,
0x0000000fu, 0x00030037u, 0x00000007u, 0x00000010u, 0x000200f8u, 0x00000012u,
0x0004003bu, 0x00000007u, 0x00000067u, 0x00000007u, 0x0004003du, 0x00000006u,
0x00000062u, 0x0000000fu, 0x00040070u, 0x00000008u, 0x00000063u, 0x00000062u,
0x0004003du, 0x00000006u, 0x00000064u, 0x00000010u, 0x00040070u, 0x00000008u,
0x00000065u, 0x00000064u, 0x00050088u, 0x00000008u, 0x00000066u, 0x00000063u,
0x00000065u, 0x0004003du, 0x00000006u, 0x00000068u, 0x0000000fu, 0x0003003eu,
0x00000067u, 0x00000068u, 0x00050039u, 0x00000008u, 0x00000069u, 0x0000000bu,
0x00000067u, 0x00050050u, 0x0000000du, 0x0000006au, 0x00000066u, 0x00000069u,
0x000200feu, 0x0000006au, 0x00010038u, 0x00050036u, 0x00000015u, 0x00000019u,
0x00000000u, 0x00000016u, 0x00030037u, 0x00000013u, 0x00000017u, 0x00030037u,
0x00000014u, 0x00000018u, 0x000200f8u, 0x0000001au, 0x0004003bu, 0x00000014u,
0x0000006du, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000071u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000075u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x0000007eu, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000083u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x0000008eu, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000094u, 0x00000007u, 0x0004003du, 0x00000008u, 0x0000006eu, 0x00000018u,
0x0004003du, 0x00000008u, 0x0000006fu, 0x00000018u, 0x00050085u, 0x00000008u,
0x00000070u, 0x0000006eu, 0x0000006fu, 0x0003003eu, 0x0000006du, 0x00000070u,
0x0004003du, 0x00000008u, 0x00000072u, 0x0000006du, 0x0004003du, 0x00000008u,
0x00000073u, 0x0000006du, 0x00050085u, 0x00000008u, 0x00000074u, 0x00000072u,
0x00000073u, 0x0003003eu, 0x00000071u, 0x00000074u, 0x0004003du, 0x00000008u,
0x00000077u, 0x00000071u, 0x00050083u, 0x00000008u, 0x00000078u, 0x00000077u,
0x00000076u, 0x00050041u, 0x00000014u, 0x0000007au, 0x00000017u, 0x00000079u,
0x0004003du, 0x00000008u, 0x0000007bu, 0x0000007au, 0x00050085u, 0x00000008u,
0x0000007cu, 0x00000078u, 0x0000007bu, 0x00050081u, 0x00000008u, 0x0000007du,
0x00000076u, 0x0000007cu, 0x0003003eu, 0x00000075u, 0x0000007du, 0x0004003du,
0x00000008u, 0x0000007fu, 0x00000075u, 0x000500bau, 0x00000081u, 0x00000082u,
0x0000007fu, 0x00000080u, 0x000300f7u, 0x00000085u, 0x00000000u, 0x000400fau,
0x00000082u, 0x00000084u, 0x0000008cu, 0x000200f8u, 0x00000084u, 0x00050041u,
0x00000014u, 0x00000086u, 0x00000017u, 0x00000079u, 0x0004003du, 0x00000008u,
0x00000087u, 0x00000086u, 0x00050083u, 0x00000008u, 0x00000088u, 0x00000076u,
0x00000087u, 0x0004003du, 0x00000008u, 0x00000089u, 0x00000075u, 0x00050088u,
0x00000008u, 0x0000008au, 0x00000088u, 0x00000089u, 0x0006000cu, 0x00000008u,
0x0000008bu, 0x00000001u, 0x0000001fu, 0x0000008au, 0x0003003eu, 0x00000083u,
0x0000008bu, 0x000200f9u, 0x00000085u, 0x000200f8u, 0x0000008cu, 0x0003003eu,
0x00000083u, 0x00000076u, 0x000200f9u, 0x00000085u, 0x000200f8u, 0x00000085u,
0x0004003du, 0x00000008u, 0x0000008du, 0x00000083u, 0x0003003eu, 0x0000007eu,
0x0000008du, 0x00050041u, 0x00000014u, 0x00000091u, 0x00000017u, 0x00000090u,
0x0004003du, 0x00000008u, 0x00000092u, 0x00000091u, 0x00050085u, 0x00000008u,
0x00000093u, 0x0000008fu, 0x00000092u, 0x0003003eu, 0x0000008eu, 0x00000093u,
0x0004003du, 0x00000008u, 0x00000095u, 0x0000007eu, 0x0004003du, 0x00000008u,
0x00000096u, 0x0000007eu, 0x00050085u, 0x00000008u, 0x00000097u, 0x00000095u,
0x00000096u, 0x00050083u, 0x00000008u, 0x00000098u, 0x00000076u, 0x00000097u,
0x0007000cu, 0x00000008u, 0x0000009au, 0x00000001u, 0x00000028u, 0x00000098u,
0x00000099u, 0x0006000cu, 0x00000008u, 0x0000009bu, 0x00000001u, 0x0000001fu,
0x0000009au, 0x0003003eu, 0x00000094u, 0x0000009bu, 0x0004003du, 0x00000008u,
0x0000009cu, 0x00000094u, 0x0004003du, 0x00000008u, 0x0000009du, 0x0000008eu,
0x0006000cu, 0x00000008u, 0x0000009eu, 0x00000001u, 0x0000000eu, 0x0000009du,
0x00050085u, 0x00000008u, 0x0000009fu, 0x0000009cu, 0x0000009eu, 0x0004003du,
0x00000008u, 0x000000a0u, 0x00000094u, 0x0004003du, 0x00000008u, 0x000000a1u,
0x0000008eu, 0x0006000cu, 0x00000008u, 0x000000a2u, 0x00000001u, 0x0000000du,
0x000000a1u, 0x00050085u, 0x00000008u, 0x000000a3u, 0x000000a0u, 0x000000a2u,
0x0004003du, 0x00000008u, 0x000000a4u, 0x0000007eu, 0x00060050u, 0x00000015u,
0x000000a5u, 0x0000009fu, 0x000000a3u, 0x000000a4u, 0x000200feu, 0x000000a5u,
0x00010038u, 0x00050036u, 0x00000008u, 0x0000001eu, 0x00000000u, 0x0000001bu,
0x00030037u, 0x00000014u, 0x0000001cu, 0x00030037u, 0x00000014u, 0x0000001du,
0x000200f8u, 0x0000001fu, 0x0004003bu, 0x00000014u, 0x000000a8u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x000000abu, 0x00000007u, 0x0004003bu, 0x00000014u,
0x000000b1u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000bau, 0x00000007u,
0x0004003du, 0x00000008u, 0x000000a9u, 0x0000001du, 0x00050081u, 0x00000008u,
0x000000aau, 0x000000a9u, 0x00000076u, 0x0003003eu, 0x000000a8u, 0x000000aau,
0x0004003du, 0x00000008u, 0x000000acu, 0x000000a8u, 0x0004003du, 0x00000008u,
0x000000adu, 0x000000a8u, 0x00050085u, 0x00000008u, 0x000000aeu, 0x000000acu,
0x000000adu, 0x00050088u, 0x00000008u, 0x000000b0u, 0x000000aeu, 0x000000afu,
0x0003003eu, 0x000000abu, 0x000000b0u, 0x0004003du, 0x00000008u, 0x000000b2u,
0x0000001cu, 0x0004003du, 0x00000008u, 0x000000b3u, 0x000000abu, 0x00050083u,
0x00000008u, 0x000000b4u, 0x00000076u, 0x000000b3u, 0x00050085u, 0x00000008u,
0x000000b5u, 0x000000b2u, 0x000000b4u, 0x0004003du, 0x00000008u, 0x000000b6u,
0x000000abu, 0x00050081u, 0x00000008u, 0x000000b7u, 0x000000b5u, 0x000000b6u,
0x0003003eu, 0x000000b1u, 0x000000b7u, 0x0004003du, 0x00000008u, 0x000000b8u,
0x000000b1u, 0x000500bau, 0x00000081u, 0x000000b9u, 0x000000b8u, 0x00000080u,
0x000300f7u, 0x000000bcu, 0x00000000u, 0x000400fau, 0x000000b9u, 0x000000bbu,
0x000000c0u, 0x000200f8u, 0x000000bbu, 0x0004003du, 0x00000008u, 0x000000bdu,
0x0000001cu, 0x0004003du, 0x00000008u, 0x000000beu, 0x000000b1u, 0x00050088u,
0x00000008u, 0x000000bfu, 0x000000bdu, 0x000000beu, 0x0003003eu, 0x000000bau,
0x000000bfu, 0x000200f9u, 0x000000bcu, 0x000200f8u, 0x000000c0u, 0x0003003eu,
0x000000bau, 0x00000099u, 0x000200f9u, 0x000000bcu, 0x000200f8u, 0x000000bcu,
0x0004003du, 0x00000008u, 0x000000c1u, 0x000000bau, 0x000200feu, 0x000000c1u,
0x00010038u, 0x00050036u, 0x00000008u, 0x00000024u, 0x00000000u, 0x00000020u,
0x00030037u, 0x00000014u, 0x00000021u, 0x00030037u, 0x00000014u, 0x00000022u,
0x00030037u, 0x00000014u, 0x00000023u, 0x000200f8u, 0x00000025u, 0x0004003bu,
0x00000014u, 0x000000c4u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000c6u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x000000c9u, 0x00000007u, 0x0004003bu,
0x00000014u, 0x000000cbu, 0x00000007u, 0x0004003du, 0x00000008u, 0x000000c5u,
0x00000021u, 0x0003003eu, 0x000000c4u, 0x000000c5u, 0x0004003du, 0x00000008u,
0x000000c7u, 0x00000023u, 0x0003003eu, 0x000000c6u, 0x000000c7u, 0x00060039u,
0x00000008u, 0x000000c8u, 0x0000001eu, 0x000000c4u, 0x000000c6u, 0x0004003du,
0x00000008u, 0x000000cau, 0x00000022u, 0x0003003eu, 0x000000c9u, 0x000000cau,
0x0004003du, 0x00000008u, 0x000000ccu, 0x00000023u, 0x0003003eu, 0x000000cbu,
0x000000ccu, 0x00060039u, 0x00000008u, 0x000000cdu, 0x0000001eu, 0x000000c9u,
0x000000cbu, 0x00050085u, 0x00000008u, 0x000000ceu, 0x000000c8u, 0x000000cdu,
0x000200feu, 0x000000ceu, 0x00010038u, 0x00050036u, 0x0000000du, 0x00000029u,
0x00000000u, 0x00000026u, 0x00030037u, 0x00000014u, 0x00000027u, 0x00030037u,
0x00000014u, 0x00000028u, 0x000200f8u, 0x0000002au, 0x0004003bu, 0x000000d1u,
0x000000d2u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000d5u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x000000e3u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x000000e4u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000e5u, 0x00000007u,
0x0004003bu, 0x00000013u, 0x000000eeu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000efu, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000f1u, 0x00000007u,
0x0004003bu, 0x000000d1u, 0x000000f3u, 0x00000007u, 0x0004003bu, 0x00000013u,
0x000000f4u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000f6u, 0x00000007u,
0x0004003bu, 0x000000d1u, 0x000000f9u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000104u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x0000010du, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000111u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x0000011du, 0x00000007u, 0x0004003bu, 0x00000014u, 0x0000011eu, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000120u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000122u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000125u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x0000012eu, 0x00000007u, 0x0004003du, 0x00000008u,
0x000000d3u, 0x00000027u, 0x000500b8u, 0x00000081u, 0x000000d4u, 0x000000d3u,
0x00000076u, 0x000300f7u, 0x000000d7u, 0x00000000u, 0x000400fau, 0x000000d4u,
0x000000d6u, 0x000000deu, 0x000200f8u, 0x000000d6u, 0x0004003du, 0x00000008u,
0x000000d8u, 0x00000027u, 0x0004003du, 0x00000008u, 0x000000d9u, 0x00000027u,
0x00050085u, 0x00000008u, 0x000000dau, 0x000000d8u, 0x000000d9u, 0x00050083u,
0x00000008u, 0x000000dbu, 0x00000076u, 0x000000dau, 0x0007000cu, 0x00000008u,
0x000000dcu, 0x00000001u, 0x00000028u, 0x000000dbu, 0x00000099u, 0x0006000cu,
0x00000008u, 0x000000ddu, 0x00000001u, 0x0000001fu, 0x000000dcu, 0x0003003eu,
0x000000d5u, 0x000000ddu, 0x000200f9u, 0x000000d7u, 0x000200f8u, 0x000000deu,
0x0003003eu, 0x000000d5u, 0x00000099u, 0x000200f9u, 0x000000d7u, 0x000200f8u,
0x000000d7u, 0x0004003du, 0x00000008u, 0x000000dfu, 0x000000d5u, 0x0004003du,
0x00000008u, 0x000000e0u, 0x00000027u, 0x0007000cu, 0x00000008u, 0x000000e1u,
0x00000001u, 0x00000028u, 0x000000e0u, 0x00000099u, 0x00060050u, 0x00000015u,
0x000000e2u, 0x000000dfu, 0x00000099u, 0x000000e1u, 0x0003003eu, 0x000000d2u,
0x000000e2u, 0x0003003eu, 0x000000e3u, 0x00000099u, 0x0003003eu, 0x000000e4u,
0x00000099u, 0x0003003eu, 0x000000e5u, 0x00000090u, 0x000200f9u, 0x000000e6u,
0x000200f8u, 0x000000e6u, 0x000400f6u, 0x000000e8u, 0x000000e9u, 0x00000000u,
0x000200f9u, 0x000000eau, 0x000200f8u, 0x000000eau, 0x0004003du, 0x00000006u,
0x000000ebu, 0x000000e5u, 0x000500b0u, 0x00000081u, 0x000000edu, 0x000000ebu,
0x000000ecu, 0x000400fau, 0x000000edu, 0x000000e7u, 0x000000e8u, 0x000200f8u,
0x000000e7u, 0x0004003du, 0x00000006u, 0x000000f0u, 0x000000e5u, 0x0003003eu,
0x000000efu, 0x000000f0u, 0x0003003eu, 0x000000f1u, 0x000000ecu, 0x00060039u,
0x0000000du, 0x000000f2u, 0x00000011u, 0x000000efu, 0x000000f1u, 0x0003003eu,
0x000000eeu, 0x000000f2u, 0x0004003du, 0x0000000du, 0x000000f5u, 0x000000eeu,
0x0003003eu, 0x000000f4u, 0x000000f5u, 0x0004003du, 0x00000008u, 0x000000f7u,
0x00000028u, 0x0003003eu, 0x000000f6u, 0x000000f7u, 0x00060039u, 0x00000015u,
0x000000f8u, 0x00000019u, 0x000000f4u, 0x000000f6u, 0x0003003eu, 0x000000f3u,
0x000000f8u, 0x0004003du, 0x00000015u, 0x000000fbu, 0x000000d2u, 0x0004003du,
0x00000015u, 0x000000fcu, 0x000000f3u, 0x00050094u, 0x00000008u, 0x000000fdu,
0x000000fbu, 0x000000fcu, 0x00050085u, 0x00000008u, 0x000000feu, 0x000000fau,
0x000000fdu, 0x0004003du, 0x00000015u, 0x000000ffu, 0x000000f3u, 0x0005008eu,
0x00000015u, 0x00000100u, 0x000000ffu, 0x000000feu, 0x0004003du, 0x00000015u,
0x00000101u, 0x000000d2u, 0x00050083u, 0x00000015u, 0x00000102u, 0x00000100u,
0x00000101u, 0x0006000cu, 0x00000015u, 0x00000103u, 0x00000001u, 0x00000045u,
0x00000102u, 0x0003003eu, 0x000000f9u, 0x00000103u, 0x00050041u, 0x00000014u,
0x00000106u, 0x000000f9u, 0x00000105u, 0x0004003du, 0x00000008u, 0x00000107u,
0x00000106u, 0x0007000cu, 0x00000008u, 0x00000108u, 0x00000001u, 0x00000028u,
0x00000107u, 0x00000099u, 0x0003003eu, 0x00000104u, 0x00000108u, 0x0004003du,
0x00000008u, 0x00000109u, 0x00000104u, 0x000500bau, 0x00000081u, 0x0000010au,
0x00000109u, 0x00000099u, 0x000300f7u, 0x0000010cu, 0x00000000u, 0x000400fau,
0x0000010au, 0x0000010bu, 0x0000010cu, 0x000200f8u, 0x0000010bu, 0x00050041u,
0x00000014u, 0x0000010eu, 0x000000f3u, 0x00000105u, 0x0004003du, 0x00000008u,
0x0000010fu, 0x0000010eu, 0x0007000cu, 0x00000008u, 0x00000110u, 0x00000001u,
0x00000028u, 0x0000010fu, 0x00000099u, 0x0003003eu, 0x0000010du, 0x00000110u,
0x0004003du, 0x00000015u, 0x00000112u, 0x000000d2u, 0x0004003du, 0x00000015u,
0x00000113u, 0x000000f3u, 0x00050094u, 0x00000008u, 0x00000114u, 0x00000112u,
0x00000113u, 0x0007000cu, 0x00000008u, 0x00000115u, 0x00000001u, 0x00000028u,
0x00000114u, 0x00000099u, 0x0003003eu, 0x00000111u, 0x00000115u, 0x0004003du,
0x00000008u, 0x00000116u, 0x0000010du, 0x000500bau, 0x00000081u, 0x00000117u,
0x00000116u, 0x00000099u, 0x0004003du, 0x00000008u, 0x00000118u, 0x00000111u,
0x000500bau, 0x00000081u, 0x00000119u, 0x00000118u, 0x00000099u, 0x000500a7u,
0x00000081u, 0x0000011au, 0x00000117u, 0x00000119u, 0x000300f7u, 0x0000011cu,
0x00000000u, 0x000400fau, 0x0000011au, 0x0000011bu, 0x0000011cu, 0x000200f8u,
0x0000011bu, 0x0004003du, 0x00000008u, 0x0000011fu, 0x00000027u, 0x0003003eu,
0x0000011eu, 0x0000011fu, 0x0004003du, 0x00000008u, 0x00000121u, 0x00000104u,
0x0003003eu, 0x00000120u, 0x00000121u, 0x0004003du, 0x00000008u, 0x00000123u,
0x00000028u, 0x0003003eu, 0x00000122u, 0x00000123u, 0x00070039u, 0x00000008u,
0x00000124u, 0x00000024u, 0x0000011eu, 0x00000120u, 0x00000122u, 0x0003003eu,
0x0000011du, 0x00000124u, 0x0004003du, 0x00000008u, 0x00000126u, 0x0000011du,
0x0004003du, 0x00000008u, 0x00000127u, 0x00000111u, 0x00050085u, 0x00000008u,
0x00000128u, 0x00000126u, 0x00000127u, 0x0004003du, 0x00000008u, 0x00000129u,
0x0000010du, 0x0004003du, 0x00000008u, 0x0000012au, 0x00000027u, 0x00050085u,
0x00000008u, 0x0000012bu, 0x00000129u, 0x0000012au, 0x0007000cu, 0x00000008u,
0x0000012cu, 0x00000001u, 0x00000028u, 0x0000012bu, 0x00000080u, 0x00050088u,
0x00000008u, 0x0000012du, 0x00000128u, 0x0000012cu, 0x0003003eu, 0x00000125u,
0x0000012du, 0x0004003du, 0x00000008u, 0x0000012fu, 0x00000111u, 0x00050083u,
0x00000008u, 0x00000130u, 0x00000076u, 0x0000012fu, 0x0007000cu, 0x00000008u,
0x00000132u, 0x00000001u, 0x0000001au, 0x00000130u, 0x00000131u, 0x0003003eu,
0x0000012eu, 0x00000132u, 0x0004003du, 0x00000008u, 0x00000133u, 0x0000012eu,
0x00050083u, 0x00000008u, 0x00000134u, 0x00000076u, 0x00000133u, 0x0004003du,
0x00000008u, 0x00000135u, 0x00000125u, 0x00050085u, 0x00000008u, 0x00000136u,
0x00000134u, 0x00000135u, 0x0004003du, 0x00000008u, 0x00000137u, 0x000000e3u,
0x00050081u, 0x00000008u, 0x00000138u, 0x00000137u, 0x00000136u, 0x0003003eu,
0x000000e3u, 0x00000138u, 0x0004003du, 0x00000008u, 0x00000139u, 0x0000012eu,
0x0004003du, 0x00000008u, 0x0000013au, 0x00000125u, 0x00050085u, 0x00000008u,
0x0000013bu, 0x00000139u, 0x0000013au, 0x0004003du, 0x00000008u, 0x0000013cu,
0x000000e4u, 0x00050081u, 0x00000008u, 0x0000013du, 0x0000013cu, 0x0000013bu,
0x0003003eu, 0x000000e4u, 0x0000013du, 0x000200f9u, 0x0000011cu, 0x000200f8u,
0x0000011cu, 0x000200f9u, 0x0000010cu, 0x000200f8u, 0x0000010cu, 0x000200f9u,
0x000000e9u, 0x000200f8u, 0x000000e9u, 0x0004003du, 0x00000006u, 0x0000013eu,
0x000000e5u, 0x00050080u, 0x00000006u, 0x0000013fu, 0x0000013eu, 0x00000037u,
0x0003003eu, 0x000000e5u, 0x0000013fu, 0x000200f9u, 0x000000e6u, 0x000200f8u,
0x000000e8u, 0x0004003du, 0x00000008u, 0x00000140u, 0x000000e3u, 0x0004003du,
0x00000008u, 0x00000141u, 0x000000e4u, 0x00050050u, 0x0000000du, 0x00000142u,
0x00000140u, 0x00000141u, 0x00050050u, 0x0000000du, 0x00000144u, 0x00000143u,
0x00000143u, 0x00050088u, 0x0000000du, 0x00000145u, 0x00000142u, 0x00000144u,
0x000200feu, 0x00000145u, 0x00010038u,
};
@@ -0,0 +1,190 @@
// equirect_to_cube.spv — 1087 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -o equirect_to_cube.spv equirect_to_cube.comp
// then: python3 native/renderer/shaders/embed_spv.py equirect_to_cube.spv equirect_to_cube_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kEquirect_to_cubeSpvWords = 1087u;
inline constexpr std::uint32_t kEquirect_to_cubeSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x000000c3u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000005bu, 0x00000072u, 0x000000a8u,
0x000000b1u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00030005u, 0x00000012u, 0x00000075u, 0x00030005u,
0x0000001eu, 0x00000076u, 0x00030005u, 0x00000028u, 0x00000064u, 0x00040005u,
0x00000058u, 0x65636166u, 0x00000000u, 0x00080005u, 0x0000005bu, 0x475f6c67u,
0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00030005u,
0x00000060u, 0x00000078u, 0x00030005u, 0x00000064u, 0x00000079u, 0x00050005u,
0x00000070u, 0x65627543u, 0x68737550u, 0x00000000u, 0x00060006u, 0x00000070u,
0x00000000u, 0x65636166u, 0x7a69735fu, 0x00000065u, 0x00040005u, 0x00000072u,
0x75705f67u, 0x00006873u, 0x00030005u, 0x00000085u, 0x00000064u, 0x00040005u,
0x00000086u, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000088u, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000008au, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000008cu, 0x61726170u, 0x0000006du, 0x00030005u, 0x00000090u, 0x00000075u,
0x00030005u, 0x0000009bu, 0x00000076u, 0x00030005u, 0x000000a4u, 0x00726468u,
0x00050005u, 0x000000a8u, 0x71655f75u, 0x65726975u, 0x00007463u, 0x00040005u,
0x000000b1u, 0x75635f75u, 0x00006562u, 0x00040047u, 0x0000005bu, 0x0000000bu,
0x0000001cu, 0x00030047u, 0x00000070u, 0x00000002u, 0x00050048u, 0x00000070u,
0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x000000a8u, 0x00000021u,
0x00000000u, 0x00040047u, 0x000000a8u, 0x00000022u, 0x00000000u, 0x00030047u,
0x000000b1u, 0x00000019u, 0x00040047u, 0x000000b1u, 0x00000021u, 0x00000001u,
0x00040047u, 0x000000b1u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u,
0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u,
0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u,
0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u, 0x00000008u, 0x00000003u,
0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u, 0x00000007u, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u, 0x00000008u, 0x0004002bu,
0x00000008u, 0x00000015u, 0x3f000000u, 0x0004002bu, 0x00000008u, 0x0000001au,
0x40000000u, 0x0004002bu, 0x00000008u, 0x0000001cu, 0x3f800000u, 0x00040020u,
0x00000027u, 0x00000007u, 0x00000009u, 0x0004002bu, 0x00000008u, 0x00000029u,
0x00000000u, 0x0006002cu, 0x00000009u, 0x0000002au, 0x00000029u, 0x00000029u,
0x00000029u, 0x0004002bu, 0x00000008u, 0x00000039u, 0xbf800000u, 0x00040017u,
0x00000059u, 0x00000006u, 0x00000003u, 0x00040020u, 0x0000005au, 0x00000001u,
0x00000059u, 0x0004003bu, 0x0000005au, 0x0000005bu, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000005cu, 0x00000002u, 0x00040020u, 0x0000005du, 0x00000001u,
0x00000006u, 0x0004002bu, 0x00000006u, 0x00000061u, 0x00000000u, 0x0004002bu,
0x00000006u, 0x00000065u, 0x00000001u, 0x00020014u, 0x00000068u, 0x0004002bu,
0x00000006u, 0x0000006au, 0x00000006u, 0x0003001eu, 0x00000070u, 0x00000006u,
0x00040020u, 0x00000071u, 0x00000009u, 0x00000070u, 0x0004003bu, 0x00000071u,
0x00000072u, 0x00000009u, 0x00040015u, 0x00000073u, 0x00000020u, 0x00000001u,
0x0004002bu, 0x00000073u, 0x00000074u, 0x00000000u, 0x00040020u, 0x00000075u,
0x00000009u, 0x00000006u, 0x0004002bu, 0x00000008u, 0x00000096u, 0x40c90fdbu,
0x0004002bu, 0x00000008u, 0x000000a0u, 0x40490fdbu, 0x00040017u, 0x000000a2u,
0x00000008u, 0x00000004u, 0x00040020u, 0x000000a3u, 0x00000007u, 0x000000a2u,
0x00090019u, 0x000000a5u, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000a6u, 0x000000a5u,
0x00040020u, 0x000000a7u, 0x00000000u, 0x000000a6u, 0x0004003bu, 0x000000a7u,
0x000000a8u, 0x00000000u, 0x00040017u, 0x000000acu, 0x00000008u, 0x00000002u,
0x00090019u, 0x000000afu, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u,
0x00000000u, 0x00000002u, 0x00000001u, 0x00040020u, 0x000000b0u, 0x00000000u,
0x000000afu, 0x0004003bu, 0x000000b0u, 0x000000b1u, 0x00000000u, 0x00040017u,
0x000000b9u, 0x00000073u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x000000c1u,
0x00000010u, 0x0006002cu, 0x00000059u, 0x000000c2u, 0x000000c1u, 0x000000c1u,
0x00000065u, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u,
0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000007u, 0x00000058u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000060u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000064u, 0x00000007u, 0x0004003bu, 0x00000027u, 0x00000085u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000086u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000088u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x0000008au, 0x00000007u,
0x0004003bu, 0x00000007u, 0x0000008cu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000090u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000009bu, 0x00000007u,
0x0004003bu, 0x000000a3u, 0x000000a4u, 0x00000007u, 0x00050041u, 0x0000005du,
0x0000005eu, 0x0000005bu, 0x0000005cu, 0x0004003du, 0x00000006u, 0x0000005fu,
0x0000005eu, 0x0003003eu, 0x00000058u, 0x0000005fu, 0x00050041u, 0x0000005du,
0x00000062u, 0x0000005bu, 0x00000061u, 0x0004003du, 0x00000006u, 0x00000063u,
0x00000062u, 0x0003003eu, 0x00000060u, 0x00000063u, 0x00050041u, 0x0000005du,
0x00000066u, 0x0000005bu, 0x00000065u, 0x0004003du, 0x00000006u, 0x00000067u,
0x00000066u, 0x0003003eu, 0x00000064u, 0x00000067u, 0x0004003du, 0x00000006u,
0x00000069u, 0x00000058u, 0x000500aeu, 0x00000068u, 0x0000006bu, 0x00000069u,
0x0000006au, 0x000400a8u, 0x00000068u, 0x0000006cu, 0x0000006bu, 0x000300f7u,
0x0000006eu, 0x00000000u, 0x000400fau, 0x0000006cu, 0x0000006du, 0x0000006eu,
0x000200f8u, 0x0000006du, 0x0004003du, 0x00000006u, 0x0000006fu, 0x00000060u,
0x00050041u, 0x00000075u, 0x00000076u, 0x00000072u, 0x00000074u, 0x0004003du,
0x00000006u, 0x00000077u, 0x00000076u, 0x000500aeu, 0x00000068u, 0x00000078u,
0x0000006fu, 0x00000077u, 0x000200f9u, 0x0000006eu, 0x000200f8u, 0x0000006eu,
0x000700f5u, 0x00000068u, 0x00000079u, 0x0000006bu, 0x00000005u, 0x00000078u,
0x0000006du, 0x000400a8u, 0x00000068u, 0x0000007au, 0x00000079u, 0x000300f7u,
0x0000007cu, 0x00000000u, 0x000400fau, 0x0000007au, 0x0000007bu, 0x0000007cu,
0x000200f8u, 0x0000007bu, 0x0004003du, 0x00000006u, 0x0000007du, 0x00000064u,
0x00050041u, 0x00000075u, 0x0000007eu, 0x00000072u, 0x00000074u, 0x0004003du,
0x00000006u, 0x0000007fu, 0x0000007eu, 0x000500aeu, 0x00000068u, 0x00000080u,
0x0000007du, 0x0000007fu, 0x000200f9u, 0x0000007cu, 0x000200f8u, 0x0000007cu,
0x000700f5u, 0x00000068u, 0x00000081u, 0x00000079u, 0x0000006eu, 0x00000080u,
0x0000007bu, 0x000300f7u, 0x00000083u, 0x00000000u, 0x000400fau, 0x00000081u,
0x00000082u, 0x00000083u, 0x000200f8u, 0x00000082u, 0x000100fdu, 0x000200f8u,
0x00000083u, 0x0004003du, 0x00000006u, 0x00000087u, 0x00000058u, 0x0003003eu,
0x00000086u, 0x00000087u, 0x0004003du, 0x00000006u, 0x00000089u, 0x00000060u,
0x0003003eu, 0x00000088u, 0x00000089u, 0x0004003du, 0x00000006u, 0x0000008bu,
0x00000064u, 0x0003003eu, 0x0000008au, 0x0000008bu, 0x00050041u, 0x00000075u,
0x0000008du, 0x00000072u, 0x00000074u, 0x0004003du, 0x00000006u, 0x0000008eu,
0x0000008du, 0x0003003eu, 0x0000008cu, 0x0000008eu, 0x00080039u, 0x00000009u,
0x0000008fu, 0x0000000fu, 0x00000086u, 0x00000088u, 0x0000008au, 0x0000008cu,
0x0003003eu, 0x00000085u, 0x0000008fu, 0x00050041u, 0x00000011u, 0x00000091u,
0x00000085u, 0x00000061u, 0x0004003du, 0x00000008u, 0x00000092u, 0x00000091u,
0x00050041u, 0x00000011u, 0x00000093u, 0x00000085u, 0x0000005cu, 0x0004003du,
0x00000008u, 0x00000094u, 0x00000093u, 0x0007000cu, 0x00000008u, 0x00000095u,
0x00000001u, 0x00000019u, 0x00000092u, 0x00000094u, 0x00050088u, 0x00000008u,
0x00000097u, 0x00000095u, 0x00000096u, 0x00050081u, 0x00000008u, 0x00000098u,
0x00000015u, 0x00000097u, 0x0003003eu, 0x00000090u, 0x00000098u, 0x0004003du,
0x00000008u, 0x00000099u, 0x00000090u, 0x0006000cu, 0x00000008u, 0x0000009au,
0x00000001u, 0x0000000au, 0x00000099u, 0x0003003eu, 0x00000090u, 0x0000009au,
0x00050041u, 0x00000011u, 0x0000009cu, 0x00000085u, 0x00000065u, 0x0004003du,
0x00000008u, 0x0000009du, 0x0000009cu, 0x0008000cu, 0x00000008u, 0x0000009eu,
0x00000001u, 0x0000002bu, 0x0000009du, 0x00000039u, 0x0000001cu, 0x0006000cu,
0x00000008u, 0x0000009fu, 0x00000001u, 0x00000011u, 0x0000009eu, 0x00050088u,
0x00000008u, 0x000000a1u, 0x0000009fu, 0x000000a0u, 0x0003003eu, 0x0000009bu,
0x000000a1u, 0x0004003du, 0x000000a6u, 0x000000a9u, 0x000000a8u, 0x0004003du,
0x00000008u, 0x000000aau, 0x00000090u, 0x0004003du, 0x00000008u, 0x000000abu,
0x0000009bu, 0x00050050u, 0x000000acu, 0x000000adu, 0x000000aau, 0x000000abu,
0x00070058u, 0x000000a2u, 0x000000aeu, 0x000000a9u, 0x000000adu, 0x00000002u,
0x00000029u, 0x0003003eu, 0x000000a4u, 0x000000aeu, 0x0004003du, 0x000000afu,
0x000000b2u, 0x000000b1u, 0x0004003du, 0x00000006u, 0x000000b3u, 0x00000060u,
0x0004007cu, 0x00000073u, 0x000000b4u, 0x000000b3u, 0x0004003du, 0x00000006u,
0x000000b5u, 0x00000064u, 0x0004007cu, 0x00000073u, 0x000000b6u, 0x000000b5u,
0x0004003du, 0x00000006u, 0x000000b7u, 0x00000058u, 0x0004007cu, 0x00000073u,
0x000000b8u, 0x000000b7u, 0x00060050u, 0x000000b9u, 0x000000bau, 0x000000b4u,
0x000000b6u, 0x000000b8u, 0x0004003du, 0x000000a2u, 0x000000bbu, 0x000000a4u,
0x0008004fu, 0x00000009u, 0x000000bcu, 0x000000bbu, 0x000000bbu, 0x00000000u,
0x00000001u, 0x00000002u, 0x00050051u, 0x00000008u, 0x000000bdu, 0x000000bcu,
0x00000000u, 0x00050051u, 0x00000008u, 0x000000beu, 0x000000bcu, 0x00000001u,
0x00050051u, 0x00000008u, 0x000000bfu, 0x000000bcu, 0x00000002u, 0x00070050u,
0x000000a2u, 0x000000c0u, 0x000000bdu, 0x000000beu, 0x000000bfu, 0x0000001cu,
0x00040063u, 0x000000b2u, 0x000000bau, 0x000000c0u, 0x000100fdu, 0x00010038u,
0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u, 0x0000000au, 0x00030037u,
0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u, 0x0000000cu, 0x00030037u,
0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u, 0x0000000eu, 0x000200f8u,
0x00000010u, 0x0004003bu, 0x00000011u, 0x00000012u, 0x00000007u, 0x0004003bu,
0x00000011u, 0x0000001eu, 0x00000007u, 0x0004003bu, 0x00000027u, 0x00000028u,
0x00000007u, 0x0004003du, 0x00000006u, 0x00000013u, 0x0000000cu, 0x00040070u,
0x00000008u, 0x00000014u, 0x00000013u, 0x00050081u, 0x00000008u, 0x00000016u,
0x00000014u, 0x00000015u, 0x0004003du, 0x00000006u, 0x00000017u, 0x0000000eu,
0x00040070u, 0x00000008u, 0x00000018u, 0x00000017u, 0x00050088u, 0x00000008u,
0x00000019u, 0x00000016u, 0x00000018u, 0x00050085u, 0x00000008u, 0x0000001bu,
0x00000019u, 0x0000001au, 0x00050083u, 0x00000008u, 0x0000001du, 0x0000001bu,
0x0000001cu, 0x0003003eu, 0x00000012u, 0x0000001du, 0x0004003du, 0x00000006u,
0x0000001fu, 0x0000000du, 0x00040070u, 0x00000008u, 0x00000020u, 0x0000001fu,
0x00050081u, 0x00000008u, 0x00000021u, 0x00000020u, 0x00000015u, 0x0004003du,
0x00000006u, 0x00000022u, 0x0000000eu, 0x00040070u, 0x00000008u, 0x00000023u,
0x00000022u, 0x00050088u, 0x00000008u, 0x00000024u, 0x00000021u, 0x00000023u,
0x00050085u, 0x00000008u, 0x00000025u, 0x00000024u, 0x0000001au, 0x00050083u,
0x00000008u, 0x00000026u, 0x00000025u, 0x0000001cu, 0x0003003eu, 0x0000001eu,
0x00000026u, 0x0003003eu, 0x00000028u, 0x0000002au, 0x0004003du, 0x00000006u,
0x0000002bu, 0x0000000bu, 0x000300f7u, 0x00000032u, 0x00000000u, 0x000d00fbu,
0x0000002bu, 0x00000031u, 0x00000000u, 0x0000002cu, 0x00000001u, 0x0000002du,
0x00000002u, 0x0000002eu, 0x00000003u, 0x0000002fu, 0x00000004u, 0x00000030u,
0x000200f8u, 0x00000031u, 0x0004003du, 0x00000008u, 0x0000004du, 0x00000012u,
0x0004007fu, 0x00000008u, 0x0000004eu, 0x0000004du, 0x0004003du, 0x00000008u,
0x0000004fu, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000050u, 0x0000004fu,
0x00060050u, 0x00000009u, 0x00000051u, 0x0000004eu, 0x00000050u, 0x00000039u,
0x0003003eu, 0x00000028u, 0x00000051u, 0x000200f9u, 0x00000032u, 0x000200f8u,
0x0000002cu, 0x0004003du, 0x00000008u, 0x00000033u, 0x0000001eu, 0x0004007fu,
0x00000008u, 0x00000034u, 0x00000033u, 0x0004003du, 0x00000008u, 0x00000035u,
0x00000012u, 0x0004007fu, 0x00000008u, 0x00000036u, 0x00000035u, 0x00060050u,
0x00000009u, 0x00000037u, 0x0000001cu, 0x00000034u, 0x00000036u, 0x0003003eu,
0x00000028u, 0x00000037u, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x0000002du,
0x0004003du, 0x00000008u, 0x0000003au, 0x0000001eu, 0x0004007fu, 0x00000008u,
0x0000003bu, 0x0000003au, 0x0004003du, 0x00000008u, 0x0000003cu, 0x00000012u,
0x00060050u, 0x00000009u, 0x0000003du, 0x00000039u, 0x0000003bu, 0x0000003cu,
0x0003003eu, 0x00000028u, 0x0000003du, 0x000200f9u, 0x00000032u, 0x000200f8u,
0x0000002eu, 0x0004003du, 0x00000008u, 0x0000003fu, 0x00000012u, 0x0004003du,
0x00000008u, 0x00000040u, 0x0000001eu, 0x00060050u, 0x00000009u, 0x00000041u,
0x0000003fu, 0x0000001cu, 0x00000040u, 0x0003003eu, 0x00000028u, 0x00000041u,
0x000200f9u, 0x00000032u, 0x000200f8u, 0x0000002fu, 0x0004003du, 0x00000008u,
0x00000043u, 0x00000012u, 0x0004003du, 0x00000008u, 0x00000044u, 0x0000001eu,
0x0004007fu, 0x00000008u, 0x00000045u, 0x00000044u, 0x00060050u, 0x00000009u,
0x00000046u, 0x00000043u, 0x00000039u, 0x00000045u, 0x0003003eu, 0x00000028u,
0x00000046u, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x00000030u, 0x0004003du,
0x00000008u, 0x00000048u, 0x00000012u, 0x0004003du, 0x00000008u, 0x00000049u,
0x0000001eu, 0x0004007fu, 0x00000008u, 0x0000004au, 0x00000049u, 0x00060050u,
0x00000009u, 0x0000004bu, 0x00000048u, 0x0000004au, 0x0000001cu, 0x0003003eu,
0x00000028u, 0x0000004bu, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x00000032u,
0x0004003du, 0x00000009u, 0x00000054u, 0x00000028u, 0x0006000cu, 0x00000009u,
0x00000055u, 0x00000001u, 0x00000045u, 0x00000054u, 0x000200feu, 0x00000055u,
0x00010038u,
};
@@ -0,0 +1,291 @@
// ibl_shade_frag.spv — 1694 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S frag -o ibl_shade_frag.spv ibl_shade.frag
// then: python3 native/renderer/shaders/embed_spv.py ibl_shade_frag.spv ibl_shade_frag_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIbl_shade_fragSpvWords = 1694u;
inline constexpr std::uint32_t kIbl_shade_fragSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x0000011bu, 0x00000000u, 0x00020011u,
0x00000001u, 0x00020011u, 0x00000032u, 0x0006000bu, 0x00000001u, 0x4c534c47u,
0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
0x000c000fu, 0x00000004u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000021u,
0x0000008cu, 0x000000b3u, 0x000000b7u, 0x000000dbu, 0x000000e1u, 0x000000f1u,
0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u, 0x000001ccu,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00060005u, 0x0000000cu,
0x77656976u, 0x7269645fu, 0x32667628u, 0x0000003bu, 0x00030005u, 0x0000000bu,
0x0063646eu, 0x000a0005u, 0x00000016u, 0x65687073u, 0x6e5f6572u, 0x616d726fu,
0x6676286cu, 0x66763b32u, 0x31663b32u, 0x3366763bu, 0x0000003bu, 0x00030005u,
0x00000012u, 0x00000070u, 0x00030005u, 0x00000013u, 0x00000063u, 0x00030005u,
0x00000014u, 0x00000072u, 0x00030005u, 0x00000015u, 0x0000006eu, 0x00030005u,
0x00000018u, 0x00000076u, 0x00030005u, 0x0000001eu, 0x00000064u, 0x00060005u,
0x0000001fu, 0x536c6249u, 0x65646168u, 0x68737550u, 0x00000000u, 0x00060006u,
0x0000001fu, 0x00000000u, 0x5f766e69u, 0x77656976u, 0x0000305fu, 0x00060006u,
0x0000001fu, 0x00000001u, 0x5f766e69u, 0x77656976u, 0x0000315fu, 0x00060006u,
0x0000001fu, 0x00000002u, 0x5f766e69u, 0x77656976u, 0x0000325fu, 0x00060006u,
0x0000001fu, 0x00000003u, 0x5f766e69u, 0x77656976u, 0x0000335fu, 0x00060006u,
0x0000001fu, 0x00000004u, 0x5f766e69u, 0x77656976u, 0x0000345fu, 0x00060006u,
0x0000001fu, 0x00000005u, 0x5f766e69u, 0x77656976u, 0x0000355fu, 0x00060006u,
0x0000001fu, 0x00000006u, 0x5f766e69u, 0x77656976u, 0x0000365fu, 0x00060006u,
0x0000001fu, 0x00000007u, 0x5f766e69u, 0x77656976u, 0x0000375fu, 0x00060006u,
0x0000001fu, 0x00000008u, 0x5f766e69u, 0x77656976u, 0x0000385fu, 0x00040005u,
0x00000021u, 0x75705f67u, 0x00006873u, 0x00030005u, 0x00000069u, 0x00000064u,
0x00030005u, 0x00000070u, 0x00000071u, 0x00030005u, 0x0000008au, 0x0063646eu,
0x00040005u, 0x0000008cu, 0x76755f76u, 0x00000000u, 0x00040005u, 0x00000092u,
0x72696476u, 0x00000000u, 0x00040005u, 0x00000093u, 0x61726170u, 0x0000006du,
0x00040005u, 0x00000097u, 0x7466656cu, 0x00000000u, 0x00030005u, 0x0000009du,
0x00000063u, 0x00030005u, 0x000000a5u, 0x0000006eu, 0x00040005u, 0x000000a6u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000a8u, 0x61726170u, 0x0000006du,
0x00040005u, 0x000000aau, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000abu,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000b3u, 0x6f635f6fu, 0x00726f6cu,
0x00040005u, 0x000000b7u, 0x75635f75u, 0x00006562u, 0x00040005u, 0x000000c1u,
0x6174656du, 0x0000006cu, 0x00040005u, 0x000000c4u, 0x67756f72u, 0x00000068u,
0x00040005u, 0x000000c9u, 0x65626c61u, 0x00006f64u, 0x00030005u, 0x000000ceu,
0x00000076u, 0x00040005u, 0x000000d1u, 0x72696472u, 0x00000000u, 0x00030005u,
0x000000d5u, 0x0076646eu, 0x00030005u, 0x000000dau, 0x00727269u, 0x00040005u,
0x000000dbu, 0x72695f75u, 0x00000072u, 0x00040005u, 0x000000e0u, 0x66657270u,
0x00000000u, 0x00040005u, 0x000000e1u, 0x72705f75u, 0x00006665u, 0x00030005u,
0x000000edu, 0x0074756cu, 0x00040005u, 0x000000f1u, 0x756c5f75u, 0x00000074u,
0x00030005u, 0x000000f8u, 0x00003066u, 0x00040005u, 0x000000ffu, 0x63657073u,
0x00000000u, 0x00040005u, 0x0000010au, 0x66666964u, 0x00000000u, 0x00030047u,
0x0000001fu, 0x00000002u, 0x00050048u, 0x0000001fu, 0x00000000u, 0x00000023u,
0x00000000u, 0x00050048u, 0x0000001fu, 0x00000001u, 0x00000023u, 0x00000004u,
0x00050048u, 0x0000001fu, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u,
0x0000001fu, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x0000001fu,
0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x0000001fu, 0x00000005u,
0x00000023u, 0x00000014u, 0x00050048u, 0x0000001fu, 0x00000006u, 0x00000023u,
0x00000018u, 0x00050048u, 0x0000001fu, 0x00000007u, 0x00000023u, 0x0000001cu,
0x00050048u, 0x0000001fu, 0x00000008u, 0x00000023u, 0x00000020u, 0x00040047u,
0x0000008cu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x000000b3u, 0x0000001eu,
0x00000000u, 0x00040047u, 0x000000b7u, 0x00000021u, 0x00000000u, 0x00040047u,
0x000000b7u, 0x00000022u, 0x00000000u, 0x00040047u, 0x000000dbu, 0x00000021u,
0x00000001u, 0x00040047u, 0x000000dbu, 0x00000022u, 0x00000000u, 0x00040047u,
0x000000e1u, 0x00000021u, 0x00000002u, 0x00040047u, 0x000000e1u, 0x00000022u,
0x00000000u, 0x00040047u, 0x000000f1u, 0x00000021u, 0x00000003u, 0x00040047u,
0x000000f1u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x00040017u, 0x00000009u, 0x00000006u, 0x00000003u, 0x00040021u,
0x0000000au, 0x00000009u, 0x00000008u, 0x00040020u, 0x0000000eu, 0x00000007u,
0x00000006u, 0x00040020u, 0x0000000fu, 0x00000007u, 0x00000009u, 0x00020014u,
0x00000010u, 0x00070021u, 0x00000011u, 0x00000010u, 0x00000008u, 0x00000008u,
0x0000000eu, 0x0000000fu, 0x0004002bu, 0x00000006u, 0x0000001au, 0xbf800000u,
0x000b001eu, 0x0000001fu, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u,
0x00000020u, 0x00000009u, 0x0000001fu, 0x0004003bu, 0x00000020u, 0x00000021u,
0x00000009u, 0x00040015u, 0x00000022u, 0x00000020u, 0x00000001u, 0x0004002bu,
0x00000022u, 0x00000023u, 0x00000000u, 0x00040020u, 0x00000024u, 0x00000009u,
0x00000006u, 0x00040015u, 0x00000027u, 0x00000020u, 0x00000000u, 0x0004002bu,
0x00000027u, 0x00000028u, 0x00000000u, 0x0004002bu, 0x00000022u, 0x0000002cu,
0x00000001u, 0x0004002bu, 0x00000027u, 0x0000002fu, 0x00000001u, 0x0004002bu,
0x00000022u, 0x00000034u, 0x00000002u, 0x0004002bu, 0x00000027u, 0x00000037u,
0x00000002u, 0x0004002bu, 0x00000022u, 0x0000003cu, 0x00000003u, 0x0004002bu,
0x00000022u, 0x00000042u, 0x00000004u, 0x0004002bu, 0x00000022u, 0x00000049u,
0x00000005u, 0x0004002bu, 0x00000022u, 0x00000050u, 0x00000006u, 0x0004002bu,
0x00000022u, 0x00000056u, 0x00000007u, 0x0004002bu, 0x00000022u, 0x0000005du,
0x00000008u, 0x0004002bu, 0x00000006u, 0x00000075u, 0x3f800000u, 0x0004002bu,
0x00000006u, 0x00000079u, 0x00000000u, 0x0006002cu, 0x00000009u, 0x0000007au,
0x00000079u, 0x00000079u, 0x00000075u, 0x0003002au, 0x00000010u, 0x0000007bu,
0x00030029u, 0x00000010u, 0x00000087u, 0x00040020u, 0x0000008bu, 0x00000001u,
0x00000007u, 0x0004003bu, 0x0000008bu, 0x0000008cu, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000008eu, 0x40000000u, 0x00040020u, 0x00000096u, 0x00000007u,
0x00000010u, 0x00040020u, 0x00000098u, 0x00000001u, 0x00000006u, 0x0004002bu,
0x00000006u, 0x0000009bu, 0x3f000000u, 0x0004002bu, 0x00000006u, 0x0000009fu,
0x3e800000u, 0x0005002cu, 0x00000007u, 0x000000a0u, 0x0000009fu, 0x0000009bu,
0x0004002bu, 0x00000006u, 0x000000a1u, 0x3f400000u, 0x0005002cu, 0x00000007u,
0x000000a2u, 0x000000a1u, 0x0000009bu, 0x0004002bu, 0x00000006u, 0x000000a4u,
0x3ec28f5cu, 0x00040017u, 0x000000b1u, 0x00000006u, 0x00000004u, 0x00040020u,
0x000000b2u, 0x00000003u, 0x000000b1u, 0x0004003bu, 0x000000b2u, 0x000000b3u,
0x00000003u, 0x00090019u, 0x000000b4u, 0x00000006u, 0x00000003u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000b5u,
0x000000b4u, 0x00040020u, 0x000000b6u, 0x00000000u, 0x000000b5u, 0x0004003bu,
0x000000b6u, 0x000000b7u, 0x00000000u, 0x0004002bu, 0x00000006u, 0x000000c6u,
0x3d4ccccdu, 0x0004002bu, 0x00000006u, 0x000000c7u, 0x3f666666u, 0x0006002cu,
0x00000009u, 0x000000cbu, 0x00000075u, 0x00000075u, 0x00000075u, 0x0006002cu,
0x00000009u, 0x000000ccu, 0x0000009bu, 0x0000009bu, 0x0000009bu, 0x0004003bu,
0x000000b6u, 0x000000dbu, 0x00000000u, 0x0004003bu, 0x000000b6u, 0x000000e1u,
0x00000000u, 0x00090019u, 0x000000eeu, 0x00000006u, 0x00000001u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000efu,
0x000000eeu, 0x00040020u, 0x000000f0u, 0x00000000u, 0x000000efu, 0x0004003bu,
0x000000f0u, 0x000000f1u, 0x00000000u, 0x0004002bu, 0x00000006u, 0x000000f9u,
0x3d23d70au, 0x0006002cu, 0x00000009u, 0x000000fau, 0x000000f9u, 0x000000f9u,
0x000000f9u, 0x0004002bu, 0x00000006u, 0x00000111u, 0x40490fdbu, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000008u, 0x0000008au, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x00000092u, 0x00000007u, 0x0004003bu, 0x00000008u, 0x00000093u, 0x00000007u,
0x0004003bu, 0x00000096u, 0x00000097u, 0x00000007u, 0x0004003bu, 0x00000008u,
0x0000009du, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000a5u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x000000a6u, 0x00000007u, 0x0004003bu, 0x00000008u,
0x000000a8u, 0x00000007u, 0x0004003bu, 0x0000000eu, 0x000000aau, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x000000abu, 0x00000007u, 0x0004003bu, 0x0000000eu,
0x000000c1u, 0x00000007u, 0x0004003bu, 0x0000000eu, 0x000000c4u, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x000000c9u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000ceu, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000d1u, 0x00000007u,
0x0004003bu, 0x0000000eu, 0x000000d5u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000dau, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000e0u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x000000edu, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000f8u, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000ffu, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x0000010au, 0x00000007u, 0x0004003du, 0x00000007u,
0x0000008du, 0x0000008cu, 0x0005008eu, 0x00000007u, 0x0000008fu, 0x0000008du,
0x0000008eu, 0x00050050u, 0x00000007u, 0x00000090u, 0x00000075u, 0x00000075u,
0x00050083u, 0x00000007u, 0x00000091u, 0x0000008fu, 0x00000090u, 0x0003003eu,
0x0000008au, 0x00000091u, 0x0004003du, 0x00000007u, 0x00000094u, 0x0000008au,
0x0003003eu, 0x00000093u, 0x00000094u, 0x00050039u, 0x00000009u, 0x00000095u,
0x0000000cu, 0x00000093u, 0x0003003eu, 0x00000092u, 0x00000095u, 0x00050041u,
0x00000098u, 0x00000099u, 0x0000008cu, 0x00000028u, 0x0004003du, 0x00000006u,
0x0000009au, 0x00000099u, 0x000500b8u, 0x00000010u, 0x0000009cu, 0x0000009au,
0x0000009bu, 0x0003003eu, 0x00000097u, 0x0000009cu, 0x0004003du, 0x00000010u,
0x0000009eu, 0x00000097u, 0x000600a9u, 0x00000007u, 0x000000a3u, 0x0000009eu,
0x000000a0u, 0x000000a2u, 0x0003003eu, 0x0000009du, 0x000000a3u, 0x0004003du,
0x00000007u, 0x000000a7u, 0x0000008cu, 0x0003003eu, 0x000000a6u, 0x000000a7u,
0x0004003du, 0x00000007u, 0x000000a9u, 0x0000009du, 0x0003003eu, 0x000000a8u,
0x000000a9u, 0x0003003eu, 0x000000aau, 0x000000a4u, 0x00080039u, 0x00000010u,
0x000000acu, 0x00000016u, 0x000000a6u, 0x000000a8u, 0x000000aau, 0x000000abu,
0x0004003du, 0x00000009u, 0x000000adu, 0x000000abu, 0x0003003eu, 0x000000a5u,
0x000000adu, 0x000400a8u, 0x00000010u, 0x000000aeu, 0x000000acu, 0x000300f7u,
0x000000b0u, 0x00000000u, 0x000400fau, 0x000000aeu, 0x000000afu, 0x000000b0u,
0x000200f8u, 0x000000afu, 0x0004003du, 0x000000b5u, 0x000000b8u, 0x000000b7u,
0x0004003du, 0x00000009u, 0x000000b9u, 0x00000092u, 0x00050057u, 0x000000b1u,
0x000000bau, 0x000000b8u, 0x000000b9u, 0x0008004fu, 0x00000009u, 0x000000bbu,
0x000000bau, 0x000000bau, 0x00000000u, 0x00000001u, 0x00000002u, 0x00050051u,
0x00000006u, 0x000000bcu, 0x000000bbu, 0x00000000u, 0x00050051u, 0x00000006u,
0x000000bdu, 0x000000bbu, 0x00000001u, 0x00050051u, 0x00000006u, 0x000000beu,
0x000000bbu, 0x00000002u, 0x00070050u, 0x000000b1u, 0x000000bfu, 0x000000bcu,
0x000000bdu, 0x000000beu, 0x00000075u, 0x0003003eu, 0x000000b3u, 0x000000bfu,
0x000100fdu, 0x000200f8u, 0x000000b0u, 0x0004003du, 0x00000010u, 0x000000c2u,
0x00000097u, 0x000600a9u, 0x00000006u, 0x000000c3u, 0x000000c2u, 0x00000075u,
0x00000079u, 0x0003003eu, 0x000000c1u, 0x000000c3u, 0x0004003du, 0x00000010u,
0x000000c5u, 0x00000097u, 0x000600a9u, 0x00000006u, 0x000000c8u, 0x000000c5u,
0x000000c6u, 0x000000c7u, 0x0003003eu, 0x000000c4u, 0x000000c8u, 0x0004003du,
0x00000010u, 0x000000cau, 0x00000097u, 0x000600a9u, 0x00000009u, 0x000000cdu,
0x000000cau, 0x000000cbu, 0x000000ccu, 0x0003003eu, 0x000000c9u, 0x000000cdu,
0x0004003du, 0x00000009u, 0x000000cfu, 0x00000092u, 0x0004007fu, 0x00000009u,
0x000000d0u, 0x000000cfu, 0x0003003eu, 0x000000ceu, 0x000000d0u, 0x0004003du,
0x00000009u, 0x000000d2u, 0x00000092u, 0x0004003du, 0x00000009u, 0x000000d3u,
0x000000a5u, 0x0007000cu, 0x00000009u, 0x000000d4u, 0x00000001u, 0x00000047u,
0x000000d2u, 0x000000d3u, 0x0003003eu, 0x000000d1u, 0x000000d4u, 0x0004003du,
0x00000009u, 0x000000d6u, 0x000000a5u, 0x0004003du, 0x00000009u, 0x000000d7u,
0x000000ceu, 0x00050094u, 0x00000006u, 0x000000d8u, 0x000000d6u, 0x000000d7u,
0x0007000cu, 0x00000006u, 0x000000d9u, 0x00000001u, 0x00000028u, 0x000000d8u,
0x00000079u, 0x0003003eu, 0x000000d5u, 0x000000d9u, 0x0004003du, 0x000000b5u,
0x000000dcu, 0x000000dbu, 0x0004003du, 0x00000009u, 0x000000ddu, 0x000000a5u,
0x00050057u, 0x000000b1u, 0x000000deu, 0x000000dcu, 0x000000ddu, 0x0008004fu,
0x00000009u, 0x000000dfu, 0x000000deu, 0x000000deu, 0x00000000u, 0x00000001u,
0x00000002u, 0x0003003eu, 0x000000dau, 0x000000dfu, 0x0004003du, 0x000000b5u,
0x000000e2u, 0x000000e1u, 0x0004003du, 0x00000009u, 0x000000e3u, 0x000000d1u,
0x0004003du, 0x00000006u, 0x000000e4u, 0x000000c4u, 0x0004003du, 0x000000b5u,
0x000000e5u, 0x000000e1u, 0x00040064u, 0x000000b4u, 0x000000e6u, 0x000000e5u,
0x0004006au, 0x00000022u, 0x000000e7u, 0x000000e6u, 0x00050082u, 0x00000022u,
0x000000e8u, 0x000000e7u, 0x0000002cu, 0x0004006fu, 0x00000006u, 0x000000e9u,
0x000000e8u, 0x00050085u, 0x00000006u, 0x000000eau, 0x000000e4u, 0x000000e9u,
0x00070058u, 0x000000b1u, 0x000000ebu, 0x000000e2u, 0x000000e3u, 0x00000002u,
0x000000eau, 0x0008004fu, 0x00000009u, 0x000000ecu, 0x000000ebu, 0x000000ebu,
0x00000000u, 0x00000001u, 0x00000002u, 0x0003003eu, 0x000000e0u, 0x000000ecu,
0x0004003du, 0x000000efu, 0x000000f2u, 0x000000f1u, 0x0004003du, 0x00000006u,
0x000000f3u, 0x000000d5u, 0x0004003du, 0x00000006u, 0x000000f4u, 0x000000c4u,
0x00050050u, 0x00000007u, 0x000000f5u, 0x000000f3u, 0x000000f4u, 0x00050057u,
0x000000b1u, 0x000000f6u, 0x000000f2u, 0x000000f5u, 0x0007004fu, 0x00000007u,
0x000000f7u, 0x000000f6u, 0x000000f6u, 0x00000000u, 0x00000001u, 0x0003003eu,
0x000000edu, 0x000000f7u, 0x0004003du, 0x00000009u, 0x000000fbu, 0x000000c9u,
0x0004003du, 0x00000006u, 0x000000fcu, 0x000000c1u, 0x00060050u, 0x00000009u,
0x000000fdu, 0x000000fcu, 0x000000fcu, 0x000000fcu, 0x0008000cu, 0x00000009u,
0x000000feu, 0x00000001u, 0x0000002eu, 0x000000fau, 0x000000fbu, 0x000000fdu,
0x0003003eu, 0x000000f8u, 0x000000feu, 0x0004003du, 0x00000009u, 0x00000100u,
0x000000e0u, 0x0004003du, 0x00000009u, 0x00000101u, 0x000000f8u, 0x00050041u,
0x0000000eu, 0x00000102u, 0x000000edu, 0x00000028u, 0x0004003du, 0x00000006u,
0x00000103u, 0x00000102u, 0x0005008eu, 0x00000009u, 0x00000104u, 0x00000101u,
0x00000103u, 0x00050041u, 0x0000000eu, 0x00000105u, 0x000000edu, 0x0000002fu,
0x0004003du, 0x00000006u, 0x00000106u, 0x00000105u, 0x00060050u, 0x00000009u,
0x00000107u, 0x00000106u, 0x00000106u, 0x00000106u, 0x00050081u, 0x00000009u,
0x00000108u, 0x00000104u, 0x00000107u, 0x00050085u, 0x00000009u, 0x00000109u,
0x00000100u, 0x00000108u, 0x0003003eu, 0x000000ffu, 0x00000109u, 0x0004003du,
0x00000009u, 0x0000010bu, 0x000000c9u, 0x0004003du, 0x00000006u, 0x0000010cu,
0x000000c1u, 0x00050083u, 0x00000006u, 0x0000010du, 0x00000075u, 0x0000010cu,
0x0005008eu, 0x00000009u, 0x0000010eu, 0x0000010bu, 0x0000010du, 0x0004003du,
0x00000009u, 0x0000010fu, 0x000000dau, 0x00050085u, 0x00000009u, 0x00000110u,
0x0000010eu, 0x0000010fu, 0x00060050u, 0x00000009u, 0x00000112u, 0x00000111u,
0x00000111u, 0x00000111u, 0x00050088u, 0x00000009u, 0x00000113u, 0x00000110u,
0x00000112u, 0x0003003eu, 0x0000010au, 0x00000113u, 0x0004003du, 0x00000009u,
0x00000114u, 0x0000010au, 0x0004003du, 0x00000009u, 0x00000115u, 0x000000ffu,
0x00050081u, 0x00000009u, 0x00000116u, 0x00000114u, 0x00000115u, 0x00050051u,
0x00000006u, 0x00000117u, 0x00000116u, 0x00000000u, 0x00050051u, 0x00000006u,
0x00000118u, 0x00000116u, 0x00000001u, 0x00050051u, 0x00000006u, 0x00000119u,
0x00000116u, 0x00000002u, 0x00070050u, 0x000000b1u, 0x0000011au, 0x00000117u,
0x00000118u, 0x00000119u, 0x00000075u, 0x0003003eu, 0x000000b3u, 0x0000011au,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u, 0x0000000cu, 0x00000000u,
0x0000000au, 0x00030037u, 0x00000008u, 0x0000000bu, 0x000200f8u, 0x0000000du,
0x0004003bu, 0x0000000fu, 0x00000018u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x0000001eu, 0x00000007u, 0x0004003du, 0x00000007u, 0x00000019u, 0x0000000bu,
0x00050051u, 0x00000006u, 0x0000001bu, 0x00000019u, 0x00000000u, 0x00050051u,
0x00000006u, 0x0000001cu, 0x00000019u, 0x00000001u, 0x00060050u, 0x00000009u,
0x0000001du, 0x0000001bu, 0x0000001cu, 0x0000001au, 0x0003003eu, 0x00000018u,
0x0000001du, 0x00050041u, 0x00000024u, 0x00000025u, 0x00000021u, 0x00000023u,
0x0004003du, 0x00000006u, 0x00000026u, 0x00000025u, 0x00050041u, 0x0000000eu,
0x00000029u, 0x00000018u, 0x00000028u, 0x0004003du, 0x00000006u, 0x0000002au,
0x00000029u, 0x00050085u, 0x00000006u, 0x0000002bu, 0x00000026u, 0x0000002au,
0x00050041u, 0x00000024u, 0x0000002du, 0x00000021u, 0x0000002cu, 0x0004003du,
0x00000006u, 0x0000002eu, 0x0000002du, 0x00050041u, 0x0000000eu, 0x00000030u,
0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000031u, 0x00000030u,
0x00050085u, 0x00000006u, 0x00000032u, 0x0000002eu, 0x00000031u, 0x00050081u,
0x00000006u, 0x00000033u, 0x0000002bu, 0x00000032u, 0x00050041u, 0x00000024u,
0x00000035u, 0x00000021u, 0x00000034u, 0x0004003du, 0x00000006u, 0x00000036u,
0x00000035u, 0x00050041u, 0x0000000eu, 0x00000038u, 0x00000018u, 0x00000037u,
0x0004003du, 0x00000006u, 0x00000039u, 0x00000038u, 0x00050085u, 0x00000006u,
0x0000003au, 0x00000036u, 0x00000039u, 0x00050081u, 0x00000006u, 0x0000003bu,
0x00000033u, 0x0000003au, 0x00050041u, 0x00000024u, 0x0000003du, 0x00000021u,
0x0000003cu, 0x0004003du, 0x00000006u, 0x0000003eu, 0x0000003du, 0x00050041u,
0x0000000eu, 0x0000003fu, 0x00000018u, 0x00000028u, 0x0004003du, 0x00000006u,
0x00000040u, 0x0000003fu, 0x00050085u, 0x00000006u, 0x00000041u, 0x0000003eu,
0x00000040u, 0x00050041u, 0x00000024u, 0x00000043u, 0x00000021u, 0x00000042u,
0x0004003du, 0x00000006u, 0x00000044u, 0x00000043u, 0x00050041u, 0x0000000eu,
0x00000045u, 0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000046u,
0x00000045u, 0x00050085u, 0x00000006u, 0x00000047u, 0x00000044u, 0x00000046u,
0x00050081u, 0x00000006u, 0x00000048u, 0x00000041u, 0x00000047u, 0x00050041u,
0x00000024u, 0x0000004au, 0x00000021u, 0x00000049u, 0x0004003du, 0x00000006u,
0x0000004bu, 0x0000004au, 0x00050041u, 0x0000000eu, 0x0000004cu, 0x00000018u,
0x00000037u, 0x0004003du, 0x00000006u, 0x0000004du, 0x0000004cu, 0x00050085u,
0x00000006u, 0x0000004eu, 0x0000004bu, 0x0000004du, 0x00050081u, 0x00000006u,
0x0000004fu, 0x00000048u, 0x0000004eu, 0x00050041u, 0x00000024u, 0x00000051u,
0x00000021u, 0x00000050u, 0x0004003du, 0x00000006u, 0x00000052u, 0x00000051u,
0x00050041u, 0x0000000eu, 0x00000053u, 0x00000018u, 0x00000028u, 0x0004003du,
0x00000006u, 0x00000054u, 0x00000053u, 0x00050085u, 0x00000006u, 0x00000055u,
0x00000052u, 0x00000054u, 0x00050041u, 0x00000024u, 0x00000057u, 0x00000021u,
0x00000056u, 0x0004003du, 0x00000006u, 0x00000058u, 0x00000057u, 0x00050041u,
0x0000000eu, 0x00000059u, 0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u,
0x0000005au, 0x00000059u, 0x00050085u, 0x00000006u, 0x0000005bu, 0x00000058u,
0x0000005au, 0x00050081u, 0x00000006u, 0x0000005cu, 0x00000055u, 0x0000005bu,
0x00050041u, 0x00000024u, 0x0000005eu, 0x00000021u, 0x0000005du, 0x0004003du,
0x00000006u, 0x0000005fu, 0x0000005eu, 0x00050041u, 0x0000000eu, 0x00000060u,
0x00000018u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000061u, 0x00000060u,
0x00050085u, 0x00000006u, 0x00000062u, 0x0000005fu, 0x00000061u, 0x00050081u,
0x00000006u, 0x00000063u, 0x0000005cu, 0x00000062u, 0x00060050u, 0x00000009u,
0x00000064u, 0x0000003bu, 0x0000004fu, 0x00000063u, 0x0003003eu, 0x0000001eu,
0x00000064u, 0x0004003du, 0x00000009u, 0x00000065u, 0x0000001eu, 0x0006000cu,
0x00000009u, 0x00000066u, 0x00000001u, 0x00000045u, 0x00000065u, 0x000200feu,
0x00000066u, 0x00010038u, 0x00050036u, 0x00000010u, 0x00000016u, 0x00000000u,
0x00000011u, 0x00030037u, 0x00000008u, 0x00000012u, 0x00030037u, 0x00000008u,
0x00000013u, 0x00030037u, 0x0000000eu, 0x00000014u, 0x00030037u, 0x0000000fu,
0x00000015u, 0x000200f8u, 0x00000017u, 0x0004003bu, 0x00000008u, 0x00000069u,
0x00000007u, 0x0004003bu, 0x0000000eu, 0x00000070u, 0x00000007u, 0x0004003du,
0x00000007u, 0x0000006au, 0x00000012u, 0x0004003du, 0x00000007u, 0x0000006bu,
0x00000013u, 0x00050083u, 0x00000007u, 0x0000006cu, 0x0000006au, 0x0000006bu,
0x0004003du, 0x00000006u, 0x0000006du, 0x00000014u, 0x00050050u, 0x00000007u,
0x0000006eu, 0x0000006du, 0x0000006du, 0x00050088u, 0x00000007u, 0x0000006fu,
0x0000006cu, 0x0000006eu, 0x0003003eu, 0x00000069u, 0x0000006fu, 0x0004003du,
0x00000007u, 0x00000071u, 0x00000069u, 0x0004003du, 0x00000007u, 0x00000072u,
0x00000069u, 0x00050094u, 0x00000006u, 0x00000073u, 0x00000071u, 0x00000072u,
0x0003003eu, 0x00000070u, 0x00000073u, 0x0004003du, 0x00000006u, 0x00000074u,
0x00000070u, 0x000500bau, 0x00000010u, 0x00000076u, 0x00000074u, 0x00000075u,
0x000300f7u, 0x00000078u, 0x00000000u, 0x000400fau, 0x00000076u, 0x00000077u,
0x00000078u, 0x000200f8u, 0x00000077u, 0x0003003eu, 0x00000015u, 0x0000007au,
0x000200feu, 0x0000007bu, 0x000200f8u, 0x00000078u, 0x00050041u, 0x0000000eu,
0x0000007du, 0x00000069u, 0x00000028u, 0x0004003du, 0x00000006u, 0x0000007eu,
0x0000007du, 0x00050041u, 0x0000000eu, 0x0000007fu, 0x00000069u, 0x0000002fu,
0x0004003du, 0x00000006u, 0x00000080u, 0x0000007fu, 0x0004003du, 0x00000006u,
0x00000081u, 0x00000070u, 0x00050083u, 0x00000006u, 0x00000082u, 0x00000075u,
0x00000081u, 0x0007000cu, 0x00000006u, 0x00000083u, 0x00000001u, 0x00000028u,
0x00000082u, 0x00000079u, 0x0006000cu, 0x00000006u, 0x00000084u, 0x00000001u,
0x0000001fu, 0x00000083u, 0x00060050u, 0x00000009u, 0x00000085u, 0x0000007eu,
0x00000080u, 0x00000084u, 0x0006000cu, 0x00000009u, 0x00000086u, 0x00000001u,
0x00000045u, 0x00000085u, 0x0003003eu, 0x00000015u, 0x00000086u, 0x000200feu,
0x00000087u, 0x00010038u,
};
@@ -0,0 +1,68 @@
// ibl_shade_vert.spv — 359 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S vert -o ibl_shade_vert.spv ibl_shade.vert
// then: python3 native/renderer/shaders/embed_spv.py ibl_shade_vert.spv ibl_shade_vert_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIbl_shade_vertSpvWords = 359u;
inline constexpr std::uint32_t kIbl_shade_vertSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000036u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0008000fu, 0x00000000u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000eu, 0x00000022u, 0x0000002eu,
0x00030003u, 0x00000002u, 0x000001ccu, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00736f70u, 0x00060005u, 0x0000000eu,
0x565f6c67u, 0x65747265u, 0x646e4978u, 0x00007865u, 0x00040005u, 0x00000022u,
0x76755f76u, 0x00000000u, 0x00060005u, 0x0000002cu, 0x505f6c67u, 0x65567265u,
0x78657472u, 0x00000000u, 0x00060006u, 0x0000002cu, 0x00000000u, 0x505f6c67u,
0x7469736fu, 0x006e6f69u, 0x00070006u, 0x0000002cu, 0x00000001u, 0x505f6c67u,
0x746e696fu, 0x657a6953u, 0x00000000u, 0x00070006u, 0x0000002cu, 0x00000002u,
0x435f6c67u, 0x4470696cu, 0x61747369u, 0x0065636eu, 0x00070006u, 0x0000002cu,
0x00000003u, 0x435f6c67u, 0x446c6c75u, 0x61747369u, 0x0065636eu, 0x00030005u,
0x0000002eu, 0x00000000u, 0x00040047u, 0x0000000eu, 0x0000000bu, 0x0000002au,
0x00040047u, 0x00000022u, 0x0000001eu, 0x00000000u, 0x00030047u, 0x0000002cu,
0x00000002u, 0x00050048u, 0x0000002cu, 0x00000000u, 0x0000000bu, 0x00000000u,
0x00050048u, 0x0000002cu, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u,
0x0000002cu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x0000002cu,
0x00000003u, 0x0000000bu, 0x00000004u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x0004002bu, 0x00000006u, 0x0000000au, 0x00000000u, 0x0005002cu,
0x00000007u, 0x0000000bu, 0x0000000au, 0x0000000au, 0x00040015u, 0x0000000cu,
0x00000020u, 0x00000001u, 0x00040020u, 0x0000000du, 0x00000001u, 0x0000000cu,
0x0004003bu, 0x0000000du, 0x0000000eu, 0x00000001u, 0x0004002bu, 0x0000000cu,
0x00000010u, 0x00000000u, 0x00020014u, 0x00000011u, 0x0004002bu, 0x00000006u,
0x00000015u, 0xbf800000u, 0x0005002cu, 0x00000007u, 0x00000016u, 0x00000015u,
0x00000015u, 0x0004002bu, 0x0000000cu, 0x00000019u, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000001du, 0x40400000u, 0x0005002cu, 0x00000007u, 0x0000001eu,
0x0000001du, 0x00000015u, 0x0005002cu, 0x00000007u, 0x00000020u, 0x00000015u,
0x0000001du, 0x00040020u, 0x00000021u, 0x00000003u, 0x00000007u, 0x0004003bu,
0x00000021u, 0x00000022u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x00000024u,
0x3f000000u, 0x00040017u, 0x00000028u, 0x00000006u, 0x00000004u, 0x00040015u,
0x00000029u, 0x00000020u, 0x00000000u, 0x0004002bu, 0x00000029u, 0x0000002au,
0x00000001u, 0x0004001cu, 0x0000002bu, 0x00000006u, 0x0000002au, 0x0006001eu,
0x0000002cu, 0x00000028u, 0x00000006u, 0x0000002bu, 0x0000002bu, 0x00040020u,
0x0000002du, 0x00000003u, 0x0000002cu, 0x0004003bu, 0x0000002du, 0x0000002eu,
0x00000003u, 0x0004002bu, 0x00000006u, 0x00000030u, 0x3f800000u, 0x00040020u,
0x00000034u, 0x00000003u, 0x00000028u, 0x00050036u, 0x00000002u, 0x00000004u,
0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000008u,
0x00000009u, 0x00000007u, 0x0003003eu, 0x00000009u, 0x0000000bu, 0x0004003du,
0x0000000cu, 0x0000000fu, 0x0000000eu, 0x000500aau, 0x00000011u, 0x00000012u,
0x0000000fu, 0x00000010u, 0x000300f7u, 0x00000014u, 0x00000000u, 0x000400fau,
0x00000012u, 0x00000013u, 0x00000017u, 0x000200f8u, 0x00000013u, 0x0003003eu,
0x00000009u, 0x00000016u, 0x000200f9u, 0x00000014u, 0x000200f8u, 0x00000017u,
0x0004003du, 0x0000000cu, 0x00000018u, 0x0000000eu, 0x000500aau, 0x00000011u,
0x0000001au, 0x00000018u, 0x00000019u, 0x000300f7u, 0x0000001cu, 0x00000000u,
0x000400fau, 0x0000001au, 0x0000001bu, 0x0000001fu, 0x000200f8u, 0x0000001bu,
0x0003003eu, 0x00000009u, 0x0000001eu, 0x000200f9u, 0x0000001cu, 0x000200f8u,
0x0000001fu, 0x0003003eu, 0x00000009u, 0x00000020u, 0x000200f9u, 0x0000001cu,
0x000200f8u, 0x0000001cu, 0x000200f9u, 0x00000014u, 0x000200f8u, 0x00000014u,
0x0004003du, 0x00000007u, 0x00000023u, 0x00000009u, 0x0005008eu, 0x00000007u,
0x00000025u, 0x00000023u, 0x00000024u, 0x00050050u, 0x00000007u, 0x00000026u,
0x00000024u, 0x00000024u, 0x00050081u, 0x00000007u, 0x00000027u, 0x00000025u,
0x00000026u, 0x0003003eu, 0x00000022u, 0x00000027u, 0x0004003du, 0x00000007u,
0x0000002fu, 0x00000009u, 0x00050051u, 0x00000006u, 0x00000031u, 0x0000002fu,
0x00000000u, 0x00050051u, 0x00000006u, 0x00000032u, 0x0000002fu, 0x00000001u,
0x00070050u, 0x00000028u, 0x00000033u, 0x00000031u, 0x00000032u, 0x0000000au,
0x00000030u, 0x00050041u, 0x00000034u, 0x00000035u, 0x0000002eu, 0x00000010u,
0x0003003eu, 0x00000035u, 0x00000033u, 0x000100fdu, 0x00010038u,
};
@@ -0,0 +1,315 @@
// irradiance.spv — 1842 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S comp -o irradiance.spv irradiance.comp
// then: python3 native/renderer/shaders/embed_spv.py irradiance.spv irradiance_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIrradianceSpvWords = 1842u;
inline constexpr std::uint32_t kIrradianceSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000144u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x000000aau, 0x000000bdu, 0x00000120u,
0x00000133u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00070005u, 0x00000016u, 0x69736162u, 0x66762873u,
0x66763b33u, 0x66763b33u, 0x00003b33u, 0x00030005u, 0x00000013u, 0x0000006eu,
0x00030005u, 0x00000014u, 0x00000074u, 0x00030005u, 0x00000015u, 0x00000062u,
0x00080005u, 0x0000001cu, 0x69736f63u, 0x735f656eu, 0x6c706d61u, 0x31662865u,
0x3b31663bu, 0x00000000u, 0x00030005u, 0x0000001au, 0x00003175u, 0x00030005u,
0x0000001bu, 0x00003275u, 0x00030005u, 0x0000001eu, 0x00000075u, 0x00030005u,
0x0000002au, 0x00000076u, 0x00030005u, 0x00000033u, 0x00000064u, 0x00030005u,
0x00000063u, 0x00000061u, 0x00030005u, 0x00000090u, 0x00000072u, 0x00030005u,
0x00000094u, 0x00696870u, 0x00040005u, 0x000000a7u, 0x65636166u, 0x00000000u,
0x00080005u, 0x000000aau, 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu,
0x496e6f69u, 0x00000044u, 0x00030005u, 0x000000aeu, 0x00000078u, 0x00030005u,
0x000000b1u, 0x00000079u, 0x00040005u, 0x000000bbu, 0x50727249u, 0x00687375u,
0x00060006u, 0x000000bbu, 0x00000000u, 0x65636166u, 0x7a69735fu, 0x00000065u,
0x00060006u, 0x000000bbu, 0x00000001u, 0x5f6d756eu, 0x706d6173u, 0x0073656cu,
0x00040005u, 0x000000bdu, 0x75705f67u, 0x00006873u, 0x00030005u, 0x000000d0u,
0x0000006eu, 0x00040005u, 0x000000d1u, 0x61726170u, 0x0000006du, 0x00040005u,
0x000000d3u, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000d5u, 0x61726170u,
0x0000006du, 0x00040005u, 0x000000d7u, 0x61726170u, 0x0000006du, 0x00030005u,
0x000000dbu, 0x00000074u, 0x00030005u, 0x000000dcu, 0x00000062u, 0x00040005u,
0x000000ddu, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000dfu, 0x61726170u,
0x0000006du, 0x00040005u, 0x000000e0u, 0x61726170u, 0x0000006du, 0x00040005u,
0x000000e4u, 0x6e756f63u, 0x00000074u, 0x00030005u, 0x000000f1u, 0x00636361u,
0x00030005u, 0x000000f2u, 0x00000069u, 0x00030005u, 0x000000fbu, 0x00003175u,
0x00030005u, 0x00000102u, 0x00003275u, 0x00030005u, 0x00000108u, 0x00000068u,
0x00040005u, 0x00000109u, 0x61726170u, 0x0000006du, 0x00040005u, 0x0000010bu,
0x61726170u, 0x0000006du, 0x00030005u, 0x0000010eu, 0x00000064u, 0x00040005u,
0x00000120u, 0x75635f75u, 0x00006562u, 0x00030005u, 0x0000012au, 0x00727269u,
0x00040005u, 0x00000133u, 0x72695f75u, 0x00000072u, 0x00040047u, 0x000000aau,
0x0000000bu, 0x0000001cu, 0x00030047u, 0x000000bbu, 0x00000002u, 0x00050048u,
0x000000bbu, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x000000bbu,
0x00000001u, 0x00000023u, 0x00000004u, 0x00040047u, 0x00000120u, 0x00000021u,
0x00000000u, 0x00040047u, 0x00000120u, 0x00000022u, 0x00000000u, 0x00030047u,
0x00000133u, 0x00000019u, 0x00040047u, 0x00000133u, 0x00000021u, 0x00000001u,
0x00040047u, 0x00000133u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u,
0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u,
0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u,
0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u, 0x00000008u, 0x00000003u,
0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u, 0x00000007u, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u, 0x00000009u, 0x00060021u,
0x00000012u, 0x00000002u, 0x00000011u, 0x00000011u, 0x00000011u, 0x00040020u,
0x00000018u, 0x00000007u, 0x00000008u, 0x00050021u, 0x00000019u, 0x00000009u,
0x00000018u, 0x00000018u, 0x0004002bu, 0x00000008u, 0x00000021u, 0x3f000000u,
0x0004002bu, 0x00000008u, 0x00000026u, 0x40000000u, 0x0004002bu, 0x00000008u,
0x00000028u, 0x3f800000u, 0x0004002bu, 0x00000008u, 0x00000034u, 0x00000000u,
0x0006002cu, 0x00000009u, 0x00000035u, 0x00000034u, 0x00000034u, 0x00000034u,
0x0004002bu, 0x00000008u, 0x00000044u, 0xbf800000u, 0x00020014u, 0x00000064u,
0x0004002bu, 0x00000006u, 0x00000065u, 0x00000000u, 0x0004002bu, 0x00000006u,
0x00000069u, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000073u, 0x00000002u,
0x0006002cu, 0x00000009u, 0x0000007bu, 0x00000028u, 0x00000034u, 0x00000034u,
0x0006002cu, 0x00000009u, 0x00000086u, 0x00000034u, 0x00000028u, 0x00000034u,
0x0006002cu, 0x00000009u, 0x00000088u, 0x00000034u, 0x00000034u, 0x00000028u,
0x0004002bu, 0x00000008u, 0x00000095u, 0x40c90fdbu, 0x00040017u, 0x000000a8u,
0x00000006u, 0x00000003u, 0x00040020u, 0x000000a9u, 0x00000001u, 0x000000a8u,
0x0004003bu, 0x000000a9u, 0x000000aau, 0x00000001u, 0x00040020u, 0x000000abu,
0x00000001u, 0x00000006u, 0x0004002bu, 0x00000006u, 0x000000b5u, 0x00000006u,
0x0004001eu, 0x000000bbu, 0x00000006u, 0x00000006u, 0x00040020u, 0x000000bcu,
0x00000009u, 0x000000bbu, 0x0004003bu, 0x000000bcu, 0x000000bdu, 0x00000009u,
0x00040015u, 0x000000beu, 0x00000020u, 0x00000001u, 0x0004002bu, 0x000000beu,
0x000000bfu, 0x00000000u, 0x00040020u, 0x000000c0u, 0x00000009u, 0x00000006u,
0x0004002bu, 0x000000beu, 0x000000e5u, 0x00000001u, 0x0004002bu, 0x00000006u,
0x000000efu, 0x00000200u, 0x0004002bu, 0x00000008u, 0x00000105u, 0x3f1e377au,
0x00090019u, 0x0000011du, 0x00000008u, 0x00000003u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x0000011eu, 0x0000011du,
0x00040020u, 0x0000011fu, 0x00000000u, 0x0000011eu, 0x0004003bu, 0x0000011fu,
0x00000120u, 0x00000000u, 0x00040017u, 0x00000123u, 0x00000008u, 0x00000004u,
0x0004002bu, 0x00000008u, 0x0000012cu, 0x40490fdbu, 0x00090019u, 0x00000131u,
0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u, 0x00000000u, 0x00000002u,
0x00000001u, 0x00040020u, 0x00000132u, 0x00000000u, 0x00000131u, 0x0004003bu,
0x00000132u, 0x00000133u, 0x00000000u, 0x00040017u, 0x0000013bu, 0x000000beu,
0x00000003u, 0x0004002bu, 0x00000006u, 0x00000142u, 0x00000010u, 0x0006002cu,
0x000000a8u, 0x00000143u, 0x00000142u, 0x00000142u, 0x00000069u, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000007u, 0x000000a7u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000aeu, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000b1u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000d0u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000d1u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000d3u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x000000d5u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000d7u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000000dbu, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000dcu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x000000ddu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000000dfu, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000e0u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000e4u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000e9u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000f1u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000f2u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x000000fbu, 0x00000007u,
0x0004003bu, 0x00000018u, 0x00000102u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000108u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x00000109u, 0x00000007u,
0x0004003bu, 0x00000018u, 0x0000010bu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x0000010eu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000012au, 0x00000007u,
0x00050041u, 0x000000abu, 0x000000acu, 0x000000aau, 0x00000073u, 0x0004003du,
0x00000006u, 0x000000adu, 0x000000acu, 0x0003003eu, 0x000000a7u, 0x000000adu,
0x00050041u, 0x000000abu, 0x000000afu, 0x000000aau, 0x00000065u, 0x0004003du,
0x00000006u, 0x000000b0u, 0x000000afu, 0x0003003eu, 0x000000aeu, 0x000000b0u,
0x00050041u, 0x000000abu, 0x000000b2u, 0x000000aau, 0x00000069u, 0x0004003du,
0x00000006u, 0x000000b3u, 0x000000b2u, 0x0003003eu, 0x000000b1u, 0x000000b3u,
0x0004003du, 0x00000006u, 0x000000b4u, 0x000000a7u, 0x000500aeu, 0x00000064u,
0x000000b6u, 0x000000b4u, 0x000000b5u, 0x000400a8u, 0x00000064u, 0x000000b7u,
0x000000b6u, 0x000300f7u, 0x000000b9u, 0x00000000u, 0x000400fau, 0x000000b7u,
0x000000b8u, 0x000000b9u, 0x000200f8u, 0x000000b8u, 0x0004003du, 0x00000006u,
0x000000bau, 0x000000aeu, 0x00050041u, 0x000000c0u, 0x000000c1u, 0x000000bdu,
0x000000bfu, 0x0004003du, 0x00000006u, 0x000000c2u, 0x000000c1u, 0x000500aeu,
0x00000064u, 0x000000c3u, 0x000000bau, 0x000000c2u, 0x000200f9u, 0x000000b9u,
0x000200f8u, 0x000000b9u, 0x000700f5u, 0x00000064u, 0x000000c4u, 0x000000b6u,
0x00000005u, 0x000000c3u, 0x000000b8u, 0x000400a8u, 0x00000064u, 0x000000c5u,
0x000000c4u, 0x000300f7u, 0x000000c7u, 0x00000000u, 0x000400fau, 0x000000c5u,
0x000000c6u, 0x000000c7u, 0x000200f8u, 0x000000c6u, 0x0004003du, 0x00000006u,
0x000000c8u, 0x000000b1u, 0x00050041u, 0x000000c0u, 0x000000c9u, 0x000000bdu,
0x000000bfu, 0x0004003du, 0x00000006u, 0x000000cau, 0x000000c9u, 0x000500aeu,
0x00000064u, 0x000000cbu, 0x000000c8u, 0x000000cau, 0x000200f9u, 0x000000c7u,
0x000200f8u, 0x000000c7u, 0x000700f5u, 0x00000064u, 0x000000ccu, 0x000000c4u,
0x000000b9u, 0x000000cbu, 0x000000c6u, 0x000300f7u, 0x000000ceu, 0x00000000u,
0x000400fau, 0x000000ccu, 0x000000cdu, 0x000000ceu, 0x000200f8u, 0x000000cdu,
0x000100fdu, 0x000200f8u, 0x000000ceu, 0x0004003du, 0x00000006u, 0x000000d2u,
0x000000a7u, 0x0003003eu, 0x000000d1u, 0x000000d2u, 0x0004003du, 0x00000006u,
0x000000d4u, 0x000000aeu, 0x0003003eu, 0x000000d3u, 0x000000d4u, 0x0004003du,
0x00000006u, 0x000000d6u, 0x000000b1u, 0x0003003eu, 0x000000d5u, 0x000000d6u,
0x00050041u, 0x000000c0u, 0x000000d8u, 0x000000bdu, 0x000000bfu, 0x0004003du,
0x00000006u, 0x000000d9u, 0x000000d8u, 0x0003003eu, 0x000000d7u, 0x000000d9u,
0x00080039u, 0x00000009u, 0x000000dau, 0x0000000fu, 0x000000d1u, 0x000000d3u,
0x000000d5u, 0x000000d7u, 0x0003003eu, 0x000000d0u, 0x000000dau, 0x0004003du,
0x00000009u, 0x000000deu, 0x000000d0u, 0x0003003eu, 0x000000ddu, 0x000000deu,
0x00070039u, 0x00000002u, 0x000000e1u, 0x00000016u, 0x000000ddu, 0x000000dfu,
0x000000e0u, 0x0004003du, 0x00000009u, 0x000000e2u, 0x000000dfu, 0x0003003eu,
0x000000dbu, 0x000000e2u, 0x0004003du, 0x00000009u, 0x000000e3u, 0x000000e0u,
0x0003003eu, 0x000000dcu, 0x000000e3u, 0x00050041u, 0x000000c0u, 0x000000e6u,
0x000000bdu, 0x000000e5u, 0x0004003du, 0x00000006u, 0x000000e7u, 0x000000e6u,
0x000500acu, 0x00000064u, 0x000000e8u, 0x000000e7u, 0x00000065u, 0x000300f7u,
0x000000ebu, 0x00000000u, 0x000400fau, 0x000000e8u, 0x000000eau, 0x000000eeu,
0x000200f8u, 0x000000eau, 0x00050041u, 0x000000c0u, 0x000000ecu, 0x000000bdu,
0x000000e5u, 0x0004003du, 0x00000006u, 0x000000edu, 0x000000ecu, 0x0003003eu,
0x000000e9u, 0x000000edu, 0x000200f9u, 0x000000ebu, 0x000200f8u, 0x000000eeu,
0x0003003eu, 0x000000e9u, 0x000000efu, 0x000200f9u, 0x000000ebu, 0x000200f8u,
0x000000ebu, 0x0004003du, 0x00000006u, 0x000000f0u, 0x000000e9u, 0x0003003eu,
0x000000e4u, 0x000000f0u, 0x0003003eu, 0x000000f1u, 0x00000035u, 0x0003003eu,
0x000000f2u, 0x00000065u, 0x000200f9u, 0x000000f3u, 0x000200f8u, 0x000000f3u,
0x000400f6u, 0x000000f5u, 0x000000f6u, 0x00000000u, 0x000200f9u, 0x000000f7u,
0x000200f8u, 0x000000f7u, 0x0004003du, 0x00000006u, 0x000000f8u, 0x000000f2u,
0x0004003du, 0x00000006u, 0x000000f9u, 0x000000e4u, 0x000500b0u, 0x00000064u,
0x000000fau, 0x000000f8u, 0x000000f9u, 0x000400fau, 0x000000fau, 0x000000f4u,
0x000000f5u, 0x000200f8u, 0x000000f4u, 0x0004003du, 0x00000006u, 0x000000fcu,
0x000000f2u, 0x00040070u, 0x00000008u, 0x000000fdu, 0x000000fcu, 0x00050081u,
0x00000008u, 0x000000feu, 0x000000fdu, 0x00000021u, 0x0004003du, 0x00000006u,
0x000000ffu, 0x000000e4u, 0x00040070u, 0x00000008u, 0x00000100u, 0x000000ffu,
0x00050088u, 0x00000008u, 0x00000101u, 0x000000feu, 0x00000100u, 0x0003003eu,
0x000000fbu, 0x00000101u, 0x0004003du, 0x00000006u, 0x00000103u, 0x000000f2u,
0x00040070u, 0x00000008u, 0x00000104u, 0x00000103u, 0x00050085u, 0x00000008u,
0x00000106u, 0x00000104u, 0x00000105u, 0x0006000cu, 0x00000008u, 0x00000107u,
0x00000001u, 0x0000000au, 0x00000106u, 0x0003003eu, 0x00000102u, 0x00000107u,
0x0004003du, 0x00000008u, 0x0000010au, 0x000000fbu, 0x0003003eu, 0x00000109u,
0x0000010au, 0x0004003du, 0x00000008u, 0x0000010cu, 0x00000102u, 0x0003003eu,
0x0000010bu, 0x0000010cu, 0x00060039u, 0x00000009u, 0x0000010du, 0x0000001cu,
0x00000109u, 0x0000010bu, 0x0003003eu, 0x00000108u, 0x0000010du, 0x0004003du,
0x00000009u, 0x0000010fu, 0x000000dbu, 0x00050041u, 0x00000018u, 0x00000110u,
0x00000108u, 0x00000065u, 0x0004003du, 0x00000008u, 0x00000111u, 0x00000110u,
0x0005008eu, 0x00000009u, 0x00000112u, 0x0000010fu, 0x00000111u, 0x0004003du,
0x00000009u, 0x00000113u, 0x000000dcu, 0x00050041u, 0x00000018u, 0x00000114u,
0x00000108u, 0x00000069u, 0x0004003du, 0x00000008u, 0x00000115u, 0x00000114u,
0x0005008eu, 0x00000009u, 0x00000116u, 0x00000113u, 0x00000115u, 0x00050081u,
0x00000009u, 0x00000117u, 0x00000112u, 0x00000116u, 0x0004003du, 0x00000009u,
0x00000118u, 0x000000d0u, 0x00050041u, 0x00000018u, 0x00000119u, 0x00000108u,
0x00000073u, 0x0004003du, 0x00000008u, 0x0000011au, 0x00000119u, 0x0005008eu,
0x00000009u, 0x0000011bu, 0x00000118u, 0x0000011au, 0x00050081u, 0x00000009u,
0x0000011cu, 0x00000117u, 0x0000011bu, 0x0003003eu, 0x0000010eu, 0x0000011cu,
0x0004003du, 0x0000011eu, 0x00000121u, 0x00000120u, 0x0004003du, 0x00000009u,
0x00000122u, 0x0000010eu, 0x00070058u, 0x00000123u, 0x00000124u, 0x00000121u,
0x00000122u, 0x00000002u, 0x00000034u, 0x0008004fu, 0x00000009u, 0x00000125u,
0x00000124u, 0x00000124u, 0x00000000u, 0x00000001u, 0x00000002u, 0x0004003du,
0x00000009u, 0x00000126u, 0x000000f1u, 0x00050081u, 0x00000009u, 0x00000127u,
0x00000126u, 0x00000125u, 0x0003003eu, 0x000000f1u, 0x00000127u, 0x000200f9u,
0x000000f6u, 0x000200f8u, 0x000000f6u, 0x0004003du, 0x00000006u, 0x00000128u,
0x000000f2u, 0x00050080u, 0x00000006u, 0x00000129u, 0x00000128u, 0x000000e5u,
0x0003003eu, 0x000000f2u, 0x00000129u, 0x000200f9u, 0x000000f3u, 0x000200f8u,
0x000000f5u, 0x0004003du, 0x00000009u, 0x0000012bu, 0x000000f1u, 0x0004003du,
0x00000006u, 0x0000012du, 0x000000e4u, 0x00040070u, 0x00000008u, 0x0000012eu,
0x0000012du, 0x00050088u, 0x00000008u, 0x0000012fu, 0x0000012cu, 0x0000012eu,
0x0005008eu, 0x00000009u, 0x00000130u, 0x0000012bu, 0x0000012fu, 0x0003003eu,
0x0000012au, 0x00000130u, 0x0004003du, 0x00000131u, 0x00000134u, 0x00000133u,
0x0004003du, 0x00000006u, 0x00000135u, 0x000000aeu, 0x0004007cu, 0x000000beu,
0x00000136u, 0x00000135u, 0x0004003du, 0x00000006u, 0x00000137u, 0x000000b1u,
0x0004007cu, 0x000000beu, 0x00000138u, 0x00000137u, 0x0004003du, 0x00000006u,
0x00000139u, 0x000000a7u, 0x0004007cu, 0x000000beu, 0x0000013au, 0x00000139u,
0x00060050u, 0x0000013bu, 0x0000013cu, 0x00000136u, 0x00000138u, 0x0000013au,
0x0004003du, 0x00000009u, 0x0000013du, 0x0000012au, 0x00050051u, 0x00000008u,
0x0000013eu, 0x0000013du, 0x00000000u, 0x00050051u, 0x00000008u, 0x0000013fu,
0x0000013du, 0x00000001u, 0x00050051u, 0x00000008u, 0x00000140u, 0x0000013du,
0x00000002u, 0x00070050u, 0x00000123u, 0x00000141u, 0x0000013eu, 0x0000013fu,
0x00000140u, 0x00000028u, 0x00040063u, 0x00000134u, 0x0000013cu, 0x00000141u,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u,
0x0000000au, 0x00030037u, 0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u,
0x0000000cu, 0x00030037u, 0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u,
0x0000000eu, 0x000200f8u, 0x00000010u, 0x0004003bu, 0x00000018u, 0x0000001eu,
0x00000007u, 0x0004003bu, 0x00000018u, 0x0000002au, 0x00000007u, 0x0004003bu,
0x00000011u, 0x00000033u, 0x00000007u, 0x0004003du, 0x00000006u, 0x0000001fu,
0x0000000cu, 0x00040070u, 0x00000008u, 0x00000020u, 0x0000001fu, 0x00050081u,
0x00000008u, 0x00000022u, 0x00000020u, 0x00000021u, 0x0004003du, 0x00000006u,
0x00000023u, 0x0000000eu, 0x00040070u, 0x00000008u, 0x00000024u, 0x00000023u,
0x00050088u, 0x00000008u, 0x00000025u, 0x00000022u, 0x00000024u, 0x00050085u,
0x00000008u, 0x00000027u, 0x00000025u, 0x00000026u, 0x00050083u, 0x00000008u,
0x00000029u, 0x00000027u, 0x00000028u, 0x0003003eu, 0x0000001eu, 0x00000029u,
0x0004003du, 0x00000006u, 0x0000002bu, 0x0000000du, 0x00040070u, 0x00000008u,
0x0000002cu, 0x0000002bu, 0x00050081u, 0x00000008u, 0x0000002du, 0x0000002cu,
0x00000021u, 0x0004003du, 0x00000006u, 0x0000002eu, 0x0000000eu, 0x00040070u,
0x00000008u, 0x0000002fu, 0x0000002eu, 0x00050088u, 0x00000008u, 0x00000030u,
0x0000002du, 0x0000002fu, 0x00050085u, 0x00000008u, 0x00000031u, 0x00000030u,
0x00000026u, 0x00050083u, 0x00000008u, 0x00000032u, 0x00000031u, 0x00000028u,
0x0003003eu, 0x0000002au, 0x00000032u, 0x0003003eu, 0x00000033u, 0x00000035u,
0x0004003du, 0x00000006u, 0x00000036u, 0x0000000bu, 0x000300f7u, 0x0000003du,
0x00000000u, 0x000d00fbu, 0x00000036u, 0x0000003cu, 0x00000000u, 0x00000037u,
0x00000001u, 0x00000038u, 0x00000002u, 0x00000039u, 0x00000003u, 0x0000003au,
0x00000004u, 0x0000003bu, 0x000200f8u, 0x0000003cu, 0x0004003du, 0x00000008u,
0x00000058u, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000059u, 0x00000058u,
0x0004003du, 0x00000008u, 0x0000005au, 0x0000002au, 0x0004007fu, 0x00000008u,
0x0000005bu, 0x0000005au, 0x00060050u, 0x00000009u, 0x0000005cu, 0x00000059u,
0x0000005bu, 0x00000044u, 0x0003003eu, 0x00000033u, 0x0000005cu, 0x000200f9u,
0x0000003du, 0x000200f8u, 0x00000037u, 0x0004003du, 0x00000008u, 0x0000003eu,
0x0000002au, 0x0004007fu, 0x00000008u, 0x0000003fu, 0x0000003eu, 0x0004003du,
0x00000008u, 0x00000040u, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000041u,
0x00000040u, 0x00060050u, 0x00000009u, 0x00000042u, 0x00000028u, 0x0000003fu,
0x00000041u, 0x0003003eu, 0x00000033u, 0x00000042u, 0x000200f9u, 0x0000003du,
0x000200f8u, 0x00000038u, 0x0004003du, 0x00000008u, 0x00000045u, 0x0000002au,
0x0004007fu, 0x00000008u, 0x00000046u, 0x00000045u, 0x0004003du, 0x00000008u,
0x00000047u, 0x0000001eu, 0x00060050u, 0x00000009u, 0x00000048u, 0x00000044u,
0x00000046u, 0x00000047u, 0x0003003eu, 0x00000033u, 0x00000048u, 0x000200f9u,
0x0000003du, 0x000200f8u, 0x00000039u, 0x0004003du, 0x00000008u, 0x0000004au,
0x0000001eu, 0x0004003du, 0x00000008u, 0x0000004bu, 0x0000002au, 0x00060050u,
0x00000009u, 0x0000004cu, 0x0000004au, 0x00000028u, 0x0000004bu, 0x0003003eu,
0x00000033u, 0x0000004cu, 0x000200f9u, 0x0000003du, 0x000200f8u, 0x0000003au,
0x0004003du, 0x00000008u, 0x0000004eu, 0x0000001eu, 0x0004003du, 0x00000008u,
0x0000004fu, 0x0000002au, 0x0004007fu, 0x00000008u, 0x00000050u, 0x0000004fu,
0x00060050u, 0x00000009u, 0x00000051u, 0x0000004eu, 0x00000044u, 0x00000050u,
0x0003003eu, 0x00000033u, 0x00000051u, 0x000200f9u, 0x0000003du, 0x000200f8u,
0x0000003bu, 0x0004003du, 0x00000008u, 0x00000053u, 0x0000001eu, 0x0004003du,
0x00000008u, 0x00000054u, 0x0000002au, 0x0004007fu, 0x00000008u, 0x00000055u,
0x00000054u, 0x00060050u, 0x00000009u, 0x00000056u, 0x00000053u, 0x00000055u,
0x00000028u, 0x0003003eu, 0x00000033u, 0x00000056u, 0x000200f9u, 0x0000003du,
0x000200f8u, 0x0000003du, 0x0004003du, 0x00000009u, 0x0000005fu, 0x00000033u,
0x0006000cu, 0x00000009u, 0x00000060u, 0x00000001u, 0x00000045u, 0x0000005fu,
0x000200feu, 0x00000060u, 0x00010038u, 0x00050036u, 0x00000002u, 0x00000016u,
0x00000000u, 0x00000012u, 0x00030037u, 0x00000011u, 0x00000013u, 0x00030037u,
0x00000011u, 0x00000014u, 0x00030037u, 0x00000011u, 0x00000015u, 0x000200f8u,
0x00000017u, 0x0004003bu, 0x00000011u, 0x00000063u, 0x00000007u, 0x0003003eu,
0x00000063u, 0x00000035u, 0x00050041u, 0x00000018u, 0x00000066u, 0x00000013u,
0x00000065u, 0x0004003du, 0x00000008u, 0x00000067u, 0x00000066u, 0x0006000cu,
0x00000008u, 0x00000068u, 0x00000001u, 0x00000004u, 0x00000067u, 0x00050041u,
0x00000018u, 0x0000006au, 0x00000013u, 0x00000069u, 0x0004003du, 0x00000008u,
0x0000006bu, 0x0000006au, 0x0006000cu, 0x00000008u, 0x0000006cu, 0x00000001u,
0x00000004u, 0x0000006bu, 0x000500b8u, 0x00000064u, 0x0000006du, 0x00000068u,
0x0000006cu, 0x000300f7u, 0x0000006fu, 0x00000000u, 0x000400fau, 0x0000006du,
0x0000006eu, 0x0000006fu, 0x000200f8u, 0x0000006eu, 0x00050041u, 0x00000018u,
0x00000070u, 0x00000013u, 0x00000065u, 0x0004003du, 0x00000008u, 0x00000071u,
0x00000070u, 0x0006000cu, 0x00000008u, 0x00000072u, 0x00000001u, 0x00000004u,
0x00000071u, 0x00050041u, 0x00000018u, 0x00000074u, 0x00000013u, 0x00000073u,
0x0004003du, 0x00000008u, 0x00000075u, 0x00000074u, 0x0006000cu, 0x00000008u,
0x00000076u, 0x00000001u, 0x00000004u, 0x00000075u, 0x000500b8u, 0x00000064u,
0x00000077u, 0x00000072u, 0x00000076u, 0x000200f9u, 0x0000006fu, 0x000200f8u,
0x0000006fu, 0x000700f5u, 0x00000064u, 0x00000078u, 0x0000006du, 0x00000017u,
0x00000077u, 0x0000006eu, 0x000300f7u, 0x0000007au, 0x00000000u, 0x000400fau,
0x00000078u, 0x00000079u, 0x0000007cu, 0x000200f8u, 0x00000079u, 0x0003003eu,
0x00000063u, 0x0000007bu, 0x000200f9u, 0x0000007au, 0x000200f8u, 0x0000007cu,
0x00050041u, 0x00000018u, 0x0000007du, 0x00000013u, 0x00000069u, 0x0004003du,
0x00000008u, 0x0000007eu, 0x0000007du, 0x0006000cu, 0x00000008u, 0x0000007fu,
0x00000001u, 0x00000004u, 0x0000007eu, 0x00050041u, 0x00000018u, 0x00000080u,
0x00000013u, 0x00000073u, 0x0004003du, 0x00000008u, 0x00000081u, 0x00000080u,
0x0006000cu, 0x00000008u, 0x00000082u, 0x00000001u, 0x00000004u, 0x00000081u,
0x000500b8u, 0x00000064u, 0x00000083u, 0x0000007fu, 0x00000082u, 0x000300f7u,
0x00000085u, 0x00000000u, 0x000400fau, 0x00000083u, 0x00000084u, 0x00000087u,
0x000200f8u, 0x00000084u, 0x0003003eu, 0x00000063u, 0x00000086u, 0x000200f9u,
0x00000085u, 0x000200f8u, 0x00000087u, 0x0003003eu, 0x00000063u, 0x00000088u,
0x000200f9u, 0x00000085u, 0x000200f8u, 0x00000085u, 0x000200f9u, 0x0000007au,
0x000200f8u, 0x0000007au, 0x0004003du, 0x00000009u, 0x00000089u, 0x00000013u,
0x0004003du, 0x00000009u, 0x0000008au, 0x00000063u, 0x0007000cu, 0x00000009u,
0x0000008bu, 0x00000001u, 0x00000044u, 0x00000089u, 0x0000008au, 0x0006000cu,
0x00000009u, 0x0000008cu, 0x00000001u, 0x00000045u, 0x0000008bu, 0x0003003eu,
0x00000014u, 0x0000008cu, 0x0004003du, 0x00000009u, 0x0000008du, 0x00000013u,
0x0004003du, 0x00000009u, 0x0000008eu, 0x00000014u, 0x0007000cu, 0x00000009u,
0x0000008fu, 0x00000001u, 0x00000044u, 0x0000008du, 0x0000008eu, 0x0003003eu,
0x00000015u, 0x0000008fu, 0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u,
0x0000001cu, 0x00000000u, 0x00000019u, 0x00030037u, 0x00000018u, 0x0000001au,
0x00030037u, 0x00000018u, 0x0000001bu, 0x000200f8u, 0x0000001du, 0x0004003bu,
0x00000018u, 0x00000090u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x00000094u,
0x00000007u, 0x0004003du, 0x00000008u, 0x00000091u, 0x0000001au, 0x0007000cu,
0x00000008u, 0x00000092u, 0x00000001u, 0x00000028u, 0x00000091u, 0x00000034u,
0x0006000cu, 0x00000008u, 0x00000093u, 0x00000001u, 0x0000001fu, 0x00000092u,
0x0003003eu, 0x00000090u, 0x00000093u, 0x0004003du, 0x00000008u, 0x00000096u,
0x0000001bu, 0x00050085u, 0x00000008u, 0x00000097u, 0x00000095u, 0x00000096u,
0x0003003eu, 0x00000094u, 0x00000097u, 0x0004003du, 0x00000008u, 0x00000098u,
0x00000090u, 0x0004003du, 0x00000008u, 0x00000099u, 0x00000094u, 0x0006000cu,
0x00000008u, 0x0000009au, 0x00000001u, 0x0000000eu, 0x00000099u, 0x00050085u,
0x00000008u, 0x0000009bu, 0x00000098u, 0x0000009au, 0x0004003du, 0x00000008u,
0x0000009cu, 0x00000090u, 0x0004003du, 0x00000008u, 0x0000009du, 0x00000094u,
0x0006000cu, 0x00000008u, 0x0000009eu, 0x00000001u, 0x0000000du, 0x0000009du,
0x00050085u, 0x00000008u, 0x0000009fu, 0x0000009cu, 0x0000009eu, 0x0004003du,
0x00000008u, 0x000000a0u, 0x0000001au, 0x00050083u, 0x00000008u, 0x000000a1u,
0x00000028u, 0x000000a0u, 0x0007000cu, 0x00000008u, 0x000000a2u, 0x00000001u,
0x00000028u, 0x000000a1u, 0x00000034u, 0x0006000cu, 0x00000008u, 0x000000a3u,
0x00000001u, 0x0000001fu, 0x000000a2u, 0x00060050u, 0x00000009u, 0x000000a4u,
0x0000009bu, 0x0000009fu, 0x000000a3u, 0x000200feu, 0x000000a4u, 0x00010038u,
};
@@ -0,0 +1,446 @@
// prefilter.spv — 2625 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S comp -o prefilter.spv prefilter.comp
// then: python3 native/renderer/shaders/embed_spv.py prefilter.spv prefilter_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kPrefilterSpvWords = 2625u;
inline constexpr std::uint32_t kPrefilterSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x000001d0u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x00000102u, 0x00000115u, 0x000001a2u,
0x000001bfu, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00070005u, 0x00000016u, 0x69736162u, 0x66762873u,
0x66763b33u, 0x66763b33u, 0x00003b33u, 0x00030005u, 0x00000013u, 0x0000006eu,
0x00030005u, 0x00000014u, 0x00000074u, 0x00030005u, 0x00000015u, 0x00000062u,
0x00080005u, 0x0000001au, 0x69646172u, 0x5f6c6163u, 0x65766e69u, 0x5f657372u,
0x28636476u, 0x003b3175u, 0x00040005u, 0x00000019u, 0x73746962u, 0x00000000u,
0x000a0005u, 0x00000022u, 0x6f706d69u, 0x6e617472u, 0x735f6563u, 0x6c706d61u,
0x67675f65u, 0x66762878u, 0x31663b32u, 0x0000003bu, 0x00030005u, 0x00000020u,
0x00006978u, 0x00050005u, 0x00000021u, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00030005u, 0x00000024u, 0x00000075u, 0x00030005u, 0x00000030u, 0x00000076u,
0x00030005u, 0x00000039u, 0x00000064u, 0x00030005u, 0x00000069u, 0x00000061u,
0x00030005u, 0x000000c8u, 0x00000061u, 0x00030005u, 0x000000ccu, 0x00003261u,
0x00040005u, 0x000000d0u, 0x6f6e6564u, 0x0000006du, 0x00050005u, 0x000000d7u,
0x5f736f63u, 0x74656874u, 0x00000061u, 0x00030005u, 0x000000e7u, 0x00696870u,
0x00050005u, 0x000000ecu, 0x5f6e6973u, 0x74656874u, 0x00000061u, 0x00040005u,
0x000000ffu, 0x65636166u, 0x00000000u, 0x00080005u, 0x00000102u, 0x475f6c67u,
0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00030005u,
0x00000106u, 0x00000078u, 0x00030005u, 0x00000109u, 0x00000079u, 0x00050005u,
0x00000113u, 0x66657250u, 0x68737550u, 0x00000000u, 0x00060006u, 0x00000113u,
0x00000000u, 0x5f70696du, 0x65676465u, 0x00000000u, 0x00060006u, 0x00000113u,
0x00000001u, 0x5f70696du, 0x65646e69u, 0x00000078u, 0x00060006u, 0x00000113u,
0x00000002u, 0x5f70696du, 0x6e756f63u, 0x00000074u, 0x00060006u, 0x00000113u,
0x00000003u, 0x5f6d756eu, 0x706d6173u, 0x0073656cu, 0x00040005u, 0x00000115u,
0x75705f67u, 0x00006873u, 0x00030005u, 0x00000127u, 0x0000006eu, 0x00040005u,
0x00000128u, 0x61726170u, 0x0000006du, 0x00040005u, 0x0000012au, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000012cu, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000012eu, 0x61726170u, 0x0000006du, 0x00030005u, 0x00000132u, 0x00000076u,
0x00040005u, 0x00000134u, 0x67756f72u, 0x00000068u, 0x00030005u, 0x00000147u,
0x00000074u, 0x00030005u, 0x00000148u, 0x00000062u, 0x00040005u, 0x00000149u,
0x61726170u, 0x0000006du, 0x00040005u, 0x0000014bu, 0x61726170u, 0x0000006du,
0x00040005u, 0x0000014cu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000150u,
0x6e756f63u, 0x00000074u, 0x00030005u, 0x0000015du, 0x00636361u, 0x00040005u,
0x0000015eu, 0x67696577u, 0x00007468u, 0x00030005u, 0x0000015fu, 0x00000069u,
0x00030005u, 0x00000168u, 0x00000075u, 0x00030005u, 0x0000016eu, 0x00007676u,
0x00040005u, 0x0000016fu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000175u,
0x61745f68u, 0x0000006eu, 0x00040005u, 0x00000179u, 0x61726170u, 0x0000006du,
0x00040005u, 0x0000017au, 0x61726170u, 0x0000006du, 0x00030005u, 0x0000017du,
0x00000068u, 0x00030005u, 0x0000018cu, 0x0000006cu, 0x00040005u, 0x00000196u,
0x6f645f6eu, 0x006c5f74u, 0x00040005u, 0x000001a2u, 0x75635f75u, 0x00006562u,
0x00040005u, 0x000001b1u, 0x66657270u, 0x00000000u, 0x00040005u, 0x000001bfu,
0x72705f75u, 0x00006665u, 0x00040047u, 0x00000102u, 0x0000000bu, 0x0000001cu,
0x00030047u, 0x00000113u, 0x00000002u, 0x00050048u, 0x00000113u, 0x00000000u,
0x00000023u, 0x00000000u, 0x00050048u, 0x00000113u, 0x00000001u, 0x00000023u,
0x00000004u, 0x00050048u, 0x00000113u, 0x00000002u, 0x00000023u, 0x00000008u,
0x00050048u, 0x00000113u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00040047u,
0x000001a2u, 0x00000021u, 0x00000000u, 0x00040047u, 0x000001a2u, 0x00000022u,
0x00000000u, 0x00030047u, 0x000001bfu, 0x00000019u, 0x00040047u, 0x000001bfu,
0x00000021u, 0x00000001u, 0x00040047u, 0x000001bfu, 0x00000022u, 0x00000000u,
0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u,
0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u,
0x00000006u, 0x00030016u, 0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u,
0x00000008u, 0x00000003u, 0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u,
0x00000007u, 0x00000007u, 0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u,
0x00000009u, 0x00060021u, 0x00000012u, 0x00000002u, 0x00000011u, 0x00000011u,
0x00000011u, 0x00040021u, 0x00000018u, 0x00000006u, 0x00000007u, 0x00040017u,
0x0000001cu, 0x00000008u, 0x00000002u, 0x00040020u, 0x0000001du, 0x00000007u,
0x0000001cu, 0x00040020u, 0x0000001eu, 0x00000007u, 0x00000008u, 0x00050021u,
0x0000001fu, 0x00000009u, 0x0000001du, 0x0000001eu, 0x0004002bu, 0x00000008u,
0x00000027u, 0x3f000000u, 0x0004002bu, 0x00000008u, 0x0000002cu, 0x40000000u,
0x0004002bu, 0x00000008u, 0x0000002eu, 0x3f800000u, 0x0004002bu, 0x00000008u,
0x0000003au, 0x00000000u, 0x0006002cu, 0x00000009u, 0x0000003bu, 0x0000003au,
0x0000003au, 0x0000003au, 0x0004002bu, 0x00000008u, 0x0000004au, 0xbf800000u,
0x00020014u, 0x0000006au, 0x0004002bu, 0x00000006u, 0x0000006bu, 0x00000000u,
0x0004002bu, 0x00000006u, 0x0000006fu, 0x00000001u, 0x0004002bu, 0x00000006u,
0x00000079u, 0x00000002u, 0x0006002cu, 0x00000009u, 0x00000081u, 0x0000002eu,
0x0000003au, 0x0000003au, 0x0006002cu, 0x00000009u, 0x0000008cu, 0x0000003au,
0x0000002eu, 0x0000003au, 0x0006002cu, 0x00000009u, 0x0000008eu, 0x0000003au,
0x0000003au, 0x0000002eu, 0x00040015u, 0x00000097u, 0x00000020u, 0x00000001u,
0x0004002bu, 0x00000097u, 0x00000098u, 0x00000010u, 0x0004002bu, 0x00000006u,
0x0000009eu, 0x55555555u, 0x0004002bu, 0x00000097u, 0x000000a0u, 0x00000001u,
0x0004002bu, 0x00000006u, 0x000000a3u, 0xaaaaaaaau, 0x0004002bu, 0x00000006u,
0x000000a8u, 0x33333333u, 0x0004002bu, 0x00000097u, 0x000000aau, 0x00000002u,
0x0004002bu, 0x00000006u, 0x000000adu, 0xccccccccu, 0x0004002bu, 0x00000006u,
0x000000b2u, 0x0f0f0f0fu, 0x0004002bu, 0x00000097u, 0x000000b4u, 0x00000004u,
0x0004002bu, 0x00000006u, 0x000000b7u, 0xf0f0f0f0u, 0x0004002bu, 0x00000006u,
0x000000bcu, 0x00ff00ffu, 0x0004002bu, 0x00000097u, 0x000000beu, 0x00000008u,
0x0004002bu, 0x00000006u, 0x000000c1u, 0xff00ff00u, 0x0004002bu, 0x00000008u,
0x000000d9u, 0x33d6bf95u, 0x0004002bu, 0x00000008u, 0x000000e8u, 0x40c90fdbu,
0x00040017u, 0x00000100u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000101u,
0x00000001u, 0x00000100u, 0x0004003bu, 0x00000101u, 0x00000102u, 0x00000001u,
0x00040020u, 0x00000103u, 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000006u,
0x0000010du, 0x00000006u, 0x0006001eu, 0x00000113u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00040020u, 0x00000114u, 0x00000009u, 0x00000113u,
0x0004003bu, 0x00000114u, 0x00000115u, 0x00000009u, 0x0004002bu, 0x00000097u,
0x00000116u, 0x00000000u, 0x00040020u, 0x00000117u, 0x00000009u, 0x00000006u,
0x0004002bu, 0x00000097u, 0x00000151u, 0x00000003u, 0x0004002bu, 0x00000006u,
0x0000015bu, 0x00000400u, 0x0004002bu, 0x00000008u, 0x00000173u, 0x2f800000u,
0x00090019u, 0x0000019fu, 0x00000008u, 0x00000003u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000001a0u, 0x0000019fu,
0x00040020u, 0x000001a1u, 0x00000000u, 0x000001a0u, 0x0004003bu, 0x000001a1u,
0x000001a2u, 0x00000000u, 0x00040017u, 0x000001a5u, 0x00000008u, 0x00000004u,
0x00090019u, 0x000001bdu, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u,
0x00000000u, 0x00000002u, 0x00000001u, 0x00040020u, 0x000001beu, 0x00000000u,
0x000001bdu, 0x0004003bu, 0x000001beu, 0x000001bfu, 0x00000000u, 0x00040017u,
0x000001c7u, 0x00000097u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x000001ceu,
0x00000010u, 0x0006002cu, 0x00000100u, 0x000001cfu, 0x000001ceu, 0x000001ceu,
0x0000006fu, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u,
0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000007u, 0x000000ffu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000106u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000109u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000127u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000128u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000012au, 0x00000007u, 0x0004003bu, 0x00000007u, 0x0000012cu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x0000012eu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000132u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x00000134u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x00000138u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000147u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000148u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x00000149u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x0000014bu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000014cu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000150u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000155u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000015du, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x0000015eu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000015fu, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x00000168u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x0000016eu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000016fu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000175u, 0x00000007u,
0x0004003bu, 0x0000001du, 0x00000179u, 0x00000007u, 0x0004003bu, 0x0000001eu,
0x0000017au, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000017du, 0x00000007u,
0x0004003bu, 0x00000011u, 0x0000018cu, 0x00000007u, 0x0004003bu, 0x0000001eu,
0x00000196u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000001b1u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000001b4u, 0x00000007u, 0x00050041u, 0x00000103u,
0x00000104u, 0x00000102u, 0x00000079u, 0x0004003du, 0x00000006u, 0x00000105u,
0x00000104u, 0x0003003eu, 0x000000ffu, 0x00000105u, 0x00050041u, 0x00000103u,
0x00000107u, 0x00000102u, 0x0000006bu, 0x0004003du, 0x00000006u, 0x00000108u,
0x00000107u, 0x0003003eu, 0x00000106u, 0x00000108u, 0x00050041u, 0x00000103u,
0x0000010au, 0x00000102u, 0x0000006fu, 0x0004003du, 0x00000006u, 0x0000010bu,
0x0000010au, 0x0003003eu, 0x00000109u, 0x0000010bu, 0x0004003du, 0x00000006u,
0x0000010cu, 0x000000ffu, 0x000500aeu, 0x0000006au, 0x0000010eu, 0x0000010cu,
0x0000010du, 0x000400a8u, 0x0000006au, 0x0000010fu, 0x0000010eu, 0x000300f7u,
0x00000111u, 0x00000000u, 0x000400fau, 0x0000010fu, 0x00000110u, 0x00000111u,
0x000200f8u, 0x00000110u, 0x0004003du, 0x00000006u, 0x00000112u, 0x00000106u,
0x00050041u, 0x00000117u, 0x00000118u, 0x00000115u, 0x00000116u, 0x0004003du,
0x00000006u, 0x00000119u, 0x00000118u, 0x000500aeu, 0x0000006au, 0x0000011au,
0x00000112u, 0x00000119u, 0x000200f9u, 0x00000111u, 0x000200f8u, 0x00000111u,
0x000700f5u, 0x0000006au, 0x0000011bu, 0x0000010eu, 0x00000005u, 0x0000011au,
0x00000110u, 0x000400a8u, 0x0000006au, 0x0000011cu, 0x0000011bu, 0x000300f7u,
0x0000011eu, 0x00000000u, 0x000400fau, 0x0000011cu, 0x0000011du, 0x0000011eu,
0x000200f8u, 0x0000011du, 0x0004003du, 0x00000006u, 0x0000011fu, 0x00000109u,
0x00050041u, 0x00000117u, 0x00000120u, 0x00000115u, 0x00000116u, 0x0004003du,
0x00000006u, 0x00000121u, 0x00000120u, 0x000500aeu, 0x0000006au, 0x00000122u,
0x0000011fu, 0x00000121u, 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x0000011eu,
0x000700f5u, 0x0000006au, 0x00000123u, 0x0000011bu, 0x00000111u, 0x00000122u,
0x0000011du, 0x000300f7u, 0x00000125u, 0x00000000u, 0x000400fau, 0x00000123u,
0x00000124u, 0x00000125u, 0x000200f8u, 0x00000124u, 0x000100fdu, 0x000200f8u,
0x00000125u, 0x0004003du, 0x00000006u, 0x00000129u, 0x000000ffu, 0x0003003eu,
0x00000128u, 0x00000129u, 0x0004003du, 0x00000006u, 0x0000012bu, 0x00000106u,
0x0003003eu, 0x0000012au, 0x0000012bu, 0x0004003du, 0x00000006u, 0x0000012du,
0x00000109u, 0x0003003eu, 0x0000012cu, 0x0000012du, 0x00050041u, 0x00000117u,
0x0000012fu, 0x00000115u, 0x00000116u, 0x0004003du, 0x00000006u, 0x00000130u,
0x0000012fu, 0x0003003eu, 0x0000012eu, 0x00000130u, 0x00080039u, 0x00000009u,
0x00000131u, 0x0000000fu, 0x00000128u, 0x0000012au, 0x0000012cu, 0x0000012eu,
0x0003003eu, 0x00000127u, 0x00000131u, 0x0004003du, 0x00000009u, 0x00000133u,
0x00000127u, 0x0003003eu, 0x00000132u, 0x00000133u, 0x00050041u, 0x00000117u,
0x00000135u, 0x00000115u, 0x000000aau, 0x0004003du, 0x00000006u, 0x00000136u,
0x00000135u, 0x000500acu, 0x0000006au, 0x00000137u, 0x00000136u, 0x0000006fu,
0x000300f7u, 0x0000013au, 0x00000000u, 0x000400fau, 0x00000137u, 0x00000139u,
0x00000143u, 0x000200f8u, 0x00000139u, 0x00050041u, 0x00000117u, 0x0000013bu,
0x00000115u, 0x000000a0u, 0x0004003du, 0x00000006u, 0x0000013cu, 0x0000013bu,
0x00040070u, 0x00000008u, 0x0000013du, 0x0000013cu, 0x00050041u, 0x00000117u,
0x0000013eu, 0x00000115u, 0x000000aau, 0x0004003du, 0x00000006u, 0x0000013fu,
0x0000013eu, 0x00050082u, 0x00000006u, 0x00000140u, 0x0000013fu, 0x0000006fu,
0x00040070u, 0x00000008u, 0x00000141u, 0x00000140u, 0x00050088u, 0x00000008u,
0x00000142u, 0x0000013du, 0x00000141u, 0x0003003eu, 0x00000138u, 0x00000142u,
0x000200f9u, 0x0000013au, 0x000200f8u, 0x00000143u, 0x0003003eu, 0x00000138u,
0x0000003au, 0x000200f9u, 0x0000013au, 0x000200f8u, 0x0000013au, 0x0004003du,
0x00000008u, 0x00000144u, 0x00000138u, 0x0003003eu, 0x00000134u, 0x00000144u,
0x0004003du, 0x00000008u, 0x00000145u, 0x00000134u, 0x0008000cu, 0x00000008u,
0x00000146u, 0x00000001u, 0x0000002bu, 0x00000145u, 0x0000003au, 0x0000002eu,
0x0003003eu, 0x00000134u, 0x00000146u, 0x0004003du, 0x00000009u, 0x0000014au,
0x00000127u, 0x0003003eu, 0x00000149u, 0x0000014au, 0x00070039u, 0x00000002u,
0x0000014du, 0x00000016u, 0x00000149u, 0x0000014bu, 0x0000014cu, 0x0004003du,
0x00000009u, 0x0000014eu, 0x0000014bu, 0x0003003eu, 0x00000147u, 0x0000014eu,
0x0004003du, 0x00000009u, 0x0000014fu, 0x0000014cu, 0x0003003eu, 0x00000148u,
0x0000014fu, 0x00050041u, 0x00000117u, 0x00000152u, 0x00000115u, 0x00000151u,
0x0004003du, 0x00000006u, 0x00000153u, 0x00000152u, 0x000500acu, 0x0000006au,
0x00000154u, 0x00000153u, 0x0000006bu, 0x000300f7u, 0x00000157u, 0x00000000u,
0x000400fau, 0x00000154u, 0x00000156u, 0x0000015au, 0x000200f8u, 0x00000156u,
0x00050041u, 0x00000117u, 0x00000158u, 0x00000115u, 0x00000151u, 0x0004003du,
0x00000006u, 0x00000159u, 0x00000158u, 0x0003003eu, 0x00000155u, 0x00000159u,
0x000200f9u, 0x00000157u, 0x000200f8u, 0x0000015au, 0x0003003eu, 0x00000155u,
0x0000015bu, 0x000200f9u, 0x00000157u, 0x000200f8u, 0x00000157u, 0x0004003du,
0x00000006u, 0x0000015cu, 0x00000155u, 0x0003003eu, 0x00000150u, 0x0000015cu,
0x0003003eu, 0x0000015du, 0x0000003bu, 0x0003003eu, 0x0000015eu, 0x0000003au,
0x0003003eu, 0x0000015fu, 0x0000006bu, 0x000200f9u, 0x00000160u, 0x000200f8u,
0x00000160u, 0x000400f6u, 0x00000162u, 0x00000163u, 0x00000000u, 0x000200f9u,
0x00000164u, 0x000200f8u, 0x00000164u, 0x0004003du, 0x00000006u, 0x00000165u,
0x0000015fu, 0x0004003du, 0x00000006u, 0x00000166u, 0x00000150u, 0x000500b0u,
0x0000006au, 0x00000167u, 0x00000165u, 0x00000166u, 0x000400fau, 0x00000167u,
0x00000161u, 0x00000162u, 0x000200f8u, 0x00000161u, 0x0004003du, 0x00000006u,
0x00000169u, 0x0000015fu, 0x00040070u, 0x00000008u, 0x0000016au, 0x00000169u,
0x0004003du, 0x00000006u, 0x0000016bu, 0x00000150u, 0x00040070u, 0x00000008u,
0x0000016cu, 0x0000016bu, 0x00050088u, 0x00000008u, 0x0000016du, 0x0000016au,
0x0000016cu, 0x0003003eu, 0x00000168u, 0x0000016du, 0x0004003du, 0x00000006u,
0x00000170u, 0x0000015fu, 0x0003003eu, 0x0000016fu, 0x00000170u, 0x00050039u,
0x00000006u, 0x00000171u, 0x0000001au, 0x0000016fu, 0x00040070u, 0x00000008u,
0x00000172u, 0x00000171u, 0x00050085u, 0x00000008u, 0x00000174u, 0x00000172u,
0x00000173u, 0x0003003eu, 0x0000016eu, 0x00000174u, 0x0004003du, 0x00000008u,
0x00000176u, 0x00000168u, 0x0004003du, 0x00000008u, 0x00000177u, 0x0000016eu,
0x00050050u, 0x0000001cu, 0x00000178u, 0x00000176u, 0x00000177u, 0x0003003eu,
0x00000179u, 0x00000178u, 0x0004003du, 0x00000008u, 0x0000017bu, 0x00000134u,
0x0003003eu, 0x0000017au, 0x0000017bu, 0x00060039u, 0x00000009u, 0x0000017cu,
0x00000022u, 0x00000179u, 0x0000017au, 0x0003003eu, 0x00000175u, 0x0000017cu,
0x0004003du, 0x00000009u, 0x0000017eu, 0x00000147u, 0x00050041u, 0x0000001eu,
0x0000017fu, 0x00000175u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x00000180u,
0x0000017fu, 0x0005008eu, 0x00000009u, 0x00000181u, 0x0000017eu, 0x00000180u,
0x0004003du, 0x00000009u, 0x00000182u, 0x00000148u, 0x00050041u, 0x0000001eu,
0x00000183u, 0x00000175u, 0x0000006fu, 0x0004003du, 0x00000008u, 0x00000184u,
0x00000183u, 0x0005008eu, 0x00000009u, 0x00000185u, 0x00000182u, 0x00000184u,
0x00050081u, 0x00000009u, 0x00000186u, 0x00000181u, 0x00000185u, 0x0004003du,
0x00000009u, 0x00000187u, 0x00000127u, 0x00050041u, 0x0000001eu, 0x00000188u,
0x00000175u, 0x00000079u, 0x0004003du, 0x00000008u, 0x00000189u, 0x00000188u,
0x0005008eu, 0x00000009u, 0x0000018au, 0x00000187u, 0x00000189u, 0x00050081u,
0x00000009u, 0x0000018bu, 0x00000186u, 0x0000018au, 0x0003003eu, 0x0000017du,
0x0000018bu, 0x0004003du, 0x00000009u, 0x0000018du, 0x00000132u, 0x0004003du,
0x00000009u, 0x0000018eu, 0x0000017du, 0x00050094u, 0x00000008u, 0x0000018fu,
0x0000018du, 0x0000018eu, 0x00050085u, 0x00000008u, 0x00000190u, 0x0000002cu,
0x0000018fu, 0x0004003du, 0x00000009u, 0x00000191u, 0x0000017du, 0x0005008eu,
0x00000009u, 0x00000192u, 0x00000191u, 0x00000190u, 0x0004003du, 0x00000009u,
0x00000193u, 0x00000132u, 0x00050083u, 0x00000009u, 0x00000194u, 0x00000192u,
0x00000193u, 0x0006000cu, 0x00000009u, 0x00000195u, 0x00000001u, 0x00000045u,
0x00000194u, 0x0003003eu, 0x0000018cu, 0x00000195u, 0x0004003du, 0x00000009u,
0x00000197u, 0x00000127u, 0x0004003du, 0x00000009u, 0x00000198u, 0x0000018cu,
0x00050094u, 0x00000008u, 0x00000199u, 0x00000197u, 0x00000198u, 0x0007000cu,
0x00000008u, 0x0000019au, 0x00000001u, 0x00000028u, 0x00000199u, 0x0000003au,
0x0003003eu, 0x00000196u, 0x0000019au, 0x0004003du, 0x00000008u, 0x0000019bu,
0x00000196u, 0x000500bau, 0x0000006au, 0x0000019cu, 0x0000019bu, 0x0000003au,
0x000300f7u, 0x0000019eu, 0x00000000u, 0x000400fau, 0x0000019cu, 0x0000019du,
0x0000019eu, 0x000200f8u, 0x0000019du, 0x0004003du, 0x000001a0u, 0x000001a3u,
0x000001a2u, 0x0004003du, 0x00000009u, 0x000001a4u, 0x0000018cu, 0x00070058u,
0x000001a5u, 0x000001a6u, 0x000001a3u, 0x000001a4u, 0x00000002u, 0x0000003au,
0x0008004fu, 0x00000009u, 0x000001a7u, 0x000001a6u, 0x000001a6u, 0x00000000u,
0x00000001u, 0x00000002u, 0x0004003du, 0x00000008u, 0x000001a8u, 0x00000196u,
0x0005008eu, 0x00000009u, 0x000001a9u, 0x000001a7u, 0x000001a8u, 0x0004003du,
0x00000009u, 0x000001aau, 0x0000015du, 0x00050081u, 0x00000009u, 0x000001abu,
0x000001aau, 0x000001a9u, 0x0003003eu, 0x0000015du, 0x000001abu, 0x0004003du,
0x00000008u, 0x000001acu, 0x00000196u, 0x0004003du, 0x00000008u, 0x000001adu,
0x0000015eu, 0x00050081u, 0x00000008u, 0x000001aeu, 0x000001adu, 0x000001acu,
0x0003003eu, 0x0000015eu, 0x000001aeu, 0x000200f9u, 0x0000019eu, 0x000200f8u,
0x0000019eu, 0x000200f9u, 0x00000163u, 0x000200f8u, 0x00000163u, 0x0004003du,
0x00000006u, 0x000001afu, 0x0000015fu, 0x00050080u, 0x00000006u, 0x000001b0u,
0x000001afu, 0x000000a0u, 0x0003003eu, 0x0000015fu, 0x000001b0u, 0x000200f9u,
0x00000160u, 0x000200f8u, 0x00000162u, 0x0004003du, 0x00000008u, 0x000001b2u,
0x0000015eu, 0x000500bau, 0x0000006au, 0x000001b3u, 0x000001b2u, 0x000000d9u,
0x000300f7u, 0x000001b6u, 0x00000000u, 0x000400fau, 0x000001b3u, 0x000001b5u,
0x000001bbu, 0x000200f8u, 0x000001b5u, 0x0004003du, 0x00000009u, 0x000001b7u,
0x0000015du, 0x0004003du, 0x00000008u, 0x000001b8u, 0x0000015eu, 0x00060050u,
0x00000009u, 0x000001b9u, 0x000001b8u, 0x000001b8u, 0x000001b8u, 0x00050088u,
0x00000009u, 0x000001bau, 0x000001b7u, 0x000001b9u, 0x0003003eu, 0x000001b4u,
0x000001bau, 0x000200f9u, 0x000001b6u, 0x000200f8u, 0x000001bbu, 0x0003003eu,
0x000001b4u, 0x0000003bu, 0x000200f9u, 0x000001b6u, 0x000200f8u, 0x000001b6u,
0x0004003du, 0x00000009u, 0x000001bcu, 0x000001b4u, 0x0003003eu, 0x000001b1u,
0x000001bcu, 0x0004003du, 0x000001bdu, 0x000001c0u, 0x000001bfu, 0x0004003du,
0x00000006u, 0x000001c1u, 0x00000106u, 0x0004007cu, 0x00000097u, 0x000001c2u,
0x000001c1u, 0x0004003du, 0x00000006u, 0x000001c3u, 0x00000109u, 0x0004007cu,
0x00000097u, 0x000001c4u, 0x000001c3u, 0x0004003du, 0x00000006u, 0x000001c5u,
0x000000ffu, 0x0004007cu, 0x00000097u, 0x000001c6u, 0x000001c5u, 0x00060050u,
0x000001c7u, 0x000001c8u, 0x000001c2u, 0x000001c4u, 0x000001c6u, 0x0004003du,
0x00000009u, 0x000001c9u, 0x000001b1u, 0x00050051u, 0x00000008u, 0x000001cau,
0x000001c9u, 0x00000000u, 0x00050051u, 0x00000008u, 0x000001cbu, 0x000001c9u,
0x00000001u, 0x00050051u, 0x00000008u, 0x000001ccu, 0x000001c9u, 0x00000002u,
0x00070050u, 0x000001a5u, 0x000001cdu, 0x000001cau, 0x000001cbu, 0x000001ccu,
0x0000002eu, 0x00040063u, 0x000001c0u, 0x000001c8u, 0x000001cdu, 0x000100fdu,
0x00010038u, 0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u, 0x0000000au,
0x00030037u, 0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u, 0x0000000cu,
0x00030037u, 0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u, 0x0000000eu,
0x000200f8u, 0x00000010u, 0x0004003bu, 0x0000001eu, 0x00000024u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x00000030u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000039u, 0x00000007u, 0x0004003du, 0x00000006u, 0x00000025u, 0x0000000cu,
0x00040070u, 0x00000008u, 0x00000026u, 0x00000025u, 0x00050081u, 0x00000008u,
0x00000028u, 0x00000026u, 0x00000027u, 0x0004003du, 0x00000006u, 0x00000029u,
0x0000000eu, 0x00040070u, 0x00000008u, 0x0000002au, 0x00000029u, 0x00050088u,
0x00000008u, 0x0000002bu, 0x00000028u, 0x0000002au, 0x00050085u, 0x00000008u,
0x0000002du, 0x0000002bu, 0x0000002cu, 0x00050083u, 0x00000008u, 0x0000002fu,
0x0000002du, 0x0000002eu, 0x0003003eu, 0x00000024u, 0x0000002fu, 0x0004003du,
0x00000006u, 0x00000031u, 0x0000000du, 0x00040070u, 0x00000008u, 0x00000032u,
0x00000031u, 0x00050081u, 0x00000008u, 0x00000033u, 0x00000032u, 0x00000027u,
0x0004003du, 0x00000006u, 0x00000034u, 0x0000000eu, 0x00040070u, 0x00000008u,
0x00000035u, 0x00000034u, 0x00050088u, 0x00000008u, 0x00000036u, 0x00000033u,
0x00000035u, 0x00050085u, 0x00000008u, 0x00000037u, 0x00000036u, 0x0000002cu,
0x00050083u, 0x00000008u, 0x00000038u, 0x00000037u, 0x0000002eu, 0x0003003eu,
0x00000030u, 0x00000038u, 0x0003003eu, 0x00000039u, 0x0000003bu, 0x0004003du,
0x00000006u, 0x0000003cu, 0x0000000bu, 0x000300f7u, 0x00000043u, 0x00000000u,
0x000d00fbu, 0x0000003cu, 0x00000042u, 0x00000000u, 0x0000003du, 0x00000001u,
0x0000003eu, 0x00000002u, 0x0000003fu, 0x00000003u, 0x00000040u, 0x00000004u,
0x00000041u, 0x000200f8u, 0x00000042u, 0x0004003du, 0x00000008u, 0x0000005eu,
0x00000024u, 0x0004007fu, 0x00000008u, 0x0000005fu, 0x0000005eu, 0x0004003du,
0x00000008u, 0x00000060u, 0x00000030u, 0x0004007fu, 0x00000008u, 0x00000061u,
0x00000060u, 0x00060050u, 0x00000009u, 0x00000062u, 0x0000005fu, 0x00000061u,
0x0000004au, 0x0003003eu, 0x00000039u, 0x00000062u, 0x000200f9u, 0x00000043u,
0x000200f8u, 0x0000003du, 0x0004003du, 0x00000008u, 0x00000044u, 0x00000030u,
0x0004007fu, 0x00000008u, 0x00000045u, 0x00000044u, 0x0004003du, 0x00000008u,
0x00000046u, 0x00000024u, 0x0004007fu, 0x00000008u, 0x00000047u, 0x00000046u,
0x00060050u, 0x00000009u, 0x00000048u, 0x0000002eu, 0x00000045u, 0x00000047u,
0x0003003eu, 0x00000039u, 0x00000048u, 0x000200f9u, 0x00000043u, 0x000200f8u,
0x0000003eu, 0x0004003du, 0x00000008u, 0x0000004bu, 0x00000030u, 0x0004007fu,
0x00000008u, 0x0000004cu, 0x0000004bu, 0x0004003du, 0x00000008u, 0x0000004du,
0x00000024u, 0x00060050u, 0x00000009u, 0x0000004eu, 0x0000004au, 0x0000004cu,
0x0000004du, 0x0003003eu, 0x00000039u, 0x0000004eu, 0x000200f9u, 0x00000043u,
0x000200f8u, 0x0000003fu, 0x0004003du, 0x00000008u, 0x00000050u, 0x00000024u,
0x0004003du, 0x00000008u, 0x00000051u, 0x00000030u, 0x00060050u, 0x00000009u,
0x00000052u, 0x00000050u, 0x0000002eu, 0x00000051u, 0x0003003eu, 0x00000039u,
0x00000052u, 0x000200f9u, 0x00000043u, 0x000200f8u, 0x00000040u, 0x0004003du,
0x00000008u, 0x00000054u, 0x00000024u, 0x0004003du, 0x00000008u, 0x00000055u,
0x00000030u, 0x0004007fu, 0x00000008u, 0x00000056u, 0x00000055u, 0x00060050u,
0x00000009u, 0x00000057u, 0x00000054u, 0x0000004au, 0x00000056u, 0x0003003eu,
0x00000039u, 0x00000057u, 0x000200f9u, 0x00000043u, 0x000200f8u, 0x00000041u,
0x0004003du, 0x00000008u, 0x00000059u, 0x00000024u, 0x0004003du, 0x00000008u,
0x0000005au, 0x00000030u, 0x0004007fu, 0x00000008u, 0x0000005bu, 0x0000005au,
0x00060050u, 0x00000009u, 0x0000005cu, 0x00000059u, 0x0000005bu, 0x0000002eu,
0x0003003eu, 0x00000039u, 0x0000005cu, 0x000200f9u, 0x00000043u, 0x000200f8u,
0x00000043u, 0x0004003du, 0x00000009u, 0x00000065u, 0x00000039u, 0x0006000cu,
0x00000009u, 0x00000066u, 0x00000001u, 0x00000045u, 0x00000065u, 0x000200feu,
0x00000066u, 0x00010038u, 0x00050036u, 0x00000002u, 0x00000016u, 0x00000000u,
0x00000012u, 0x00030037u, 0x00000011u, 0x00000013u, 0x00030037u, 0x00000011u,
0x00000014u, 0x00030037u, 0x00000011u, 0x00000015u, 0x000200f8u, 0x00000017u,
0x0004003bu, 0x00000011u, 0x00000069u, 0x00000007u, 0x0003003eu, 0x00000069u,
0x0000003bu, 0x00050041u, 0x0000001eu, 0x0000006cu, 0x00000013u, 0x0000006bu,
0x0004003du, 0x00000008u, 0x0000006du, 0x0000006cu, 0x0006000cu, 0x00000008u,
0x0000006eu, 0x00000001u, 0x00000004u, 0x0000006du, 0x00050041u, 0x0000001eu,
0x00000070u, 0x00000013u, 0x0000006fu, 0x0004003du, 0x00000008u, 0x00000071u,
0x00000070u, 0x0006000cu, 0x00000008u, 0x00000072u, 0x00000001u, 0x00000004u,
0x00000071u, 0x000500b8u, 0x0000006au, 0x00000073u, 0x0000006eu, 0x00000072u,
0x000300f7u, 0x00000075u, 0x00000000u, 0x000400fau, 0x00000073u, 0x00000074u,
0x00000075u, 0x000200f8u, 0x00000074u, 0x00050041u, 0x0000001eu, 0x00000076u,
0x00000013u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x00000077u, 0x00000076u,
0x0006000cu, 0x00000008u, 0x00000078u, 0x00000001u, 0x00000004u, 0x00000077u,
0x00050041u, 0x0000001eu, 0x0000007au, 0x00000013u, 0x00000079u, 0x0004003du,
0x00000008u, 0x0000007bu, 0x0000007au, 0x0006000cu, 0x00000008u, 0x0000007cu,
0x00000001u, 0x00000004u, 0x0000007bu, 0x000500b8u, 0x0000006au, 0x0000007du,
0x00000078u, 0x0000007cu, 0x000200f9u, 0x00000075u, 0x000200f8u, 0x00000075u,
0x000700f5u, 0x0000006au, 0x0000007eu, 0x00000073u, 0x00000017u, 0x0000007du,
0x00000074u, 0x000300f7u, 0x00000080u, 0x00000000u, 0x000400fau, 0x0000007eu,
0x0000007fu, 0x00000082u, 0x000200f8u, 0x0000007fu, 0x0003003eu, 0x00000069u,
0x00000081u, 0x000200f9u, 0x00000080u, 0x000200f8u, 0x00000082u, 0x00050041u,
0x0000001eu, 0x00000083u, 0x00000013u, 0x0000006fu, 0x0004003du, 0x00000008u,
0x00000084u, 0x00000083u, 0x0006000cu, 0x00000008u, 0x00000085u, 0x00000001u,
0x00000004u, 0x00000084u, 0x00050041u, 0x0000001eu, 0x00000086u, 0x00000013u,
0x00000079u, 0x0004003du, 0x00000008u, 0x00000087u, 0x00000086u, 0x0006000cu,
0x00000008u, 0x00000088u, 0x00000001u, 0x00000004u, 0x00000087u, 0x000500b8u,
0x0000006au, 0x00000089u, 0x00000085u, 0x00000088u, 0x000300f7u, 0x0000008bu,
0x00000000u, 0x000400fau, 0x00000089u, 0x0000008au, 0x0000008du, 0x000200f8u,
0x0000008au, 0x0003003eu, 0x00000069u, 0x0000008cu, 0x000200f9u, 0x0000008bu,
0x000200f8u, 0x0000008du, 0x0003003eu, 0x00000069u, 0x0000008eu, 0x000200f9u,
0x0000008bu, 0x000200f8u, 0x0000008bu, 0x000200f9u, 0x00000080u, 0x000200f8u,
0x00000080u, 0x0004003du, 0x00000009u, 0x0000008fu, 0x00000013u, 0x0004003du,
0x00000009u, 0x00000090u, 0x00000069u, 0x0007000cu, 0x00000009u, 0x00000091u,
0x00000001u, 0x00000044u, 0x0000008fu, 0x00000090u, 0x0006000cu, 0x00000009u,
0x00000092u, 0x00000001u, 0x00000045u, 0x00000091u, 0x0003003eu, 0x00000014u,
0x00000092u, 0x0004003du, 0x00000009u, 0x00000093u, 0x00000013u, 0x0004003du,
0x00000009u, 0x00000094u, 0x00000014u, 0x0007000cu, 0x00000009u, 0x00000095u,
0x00000001u, 0x00000044u, 0x00000093u, 0x00000094u, 0x0003003eu, 0x00000015u,
0x00000095u, 0x000100fdu, 0x00010038u, 0x00050036u, 0x00000006u, 0x0000001au,
0x00000000u, 0x00000018u, 0x00030037u, 0x00000007u, 0x00000019u, 0x000200f8u,
0x0000001bu, 0x0004003du, 0x00000006u, 0x00000096u, 0x00000019u, 0x000500c4u,
0x00000006u, 0x00000099u, 0x00000096u, 0x00000098u, 0x0004003du, 0x00000006u,
0x0000009au, 0x00000019u, 0x000500c2u, 0x00000006u, 0x0000009bu, 0x0000009au,
0x00000098u, 0x000500c5u, 0x00000006u, 0x0000009cu, 0x00000099u, 0x0000009bu,
0x0003003eu, 0x00000019u, 0x0000009cu, 0x0004003du, 0x00000006u, 0x0000009du,
0x00000019u, 0x000500c7u, 0x00000006u, 0x0000009fu, 0x0000009du, 0x0000009eu,
0x000500c4u, 0x00000006u, 0x000000a1u, 0x0000009fu, 0x000000a0u, 0x0004003du,
0x00000006u, 0x000000a2u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000a4u,
0x000000a2u, 0x000000a3u, 0x000500c2u, 0x00000006u, 0x000000a5u, 0x000000a4u,
0x000000a0u, 0x000500c5u, 0x00000006u, 0x000000a6u, 0x000000a1u, 0x000000a5u,
0x0003003eu, 0x00000019u, 0x000000a6u, 0x0004003du, 0x00000006u, 0x000000a7u,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000a9u, 0x000000a7u, 0x000000a8u,
0x000500c4u, 0x00000006u, 0x000000abu, 0x000000a9u, 0x000000aau, 0x0004003du,
0x00000006u, 0x000000acu, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000aeu,
0x000000acu, 0x000000adu, 0x000500c2u, 0x00000006u, 0x000000afu, 0x000000aeu,
0x000000aau, 0x000500c5u, 0x00000006u, 0x000000b0u, 0x000000abu, 0x000000afu,
0x0003003eu, 0x00000019u, 0x000000b0u, 0x0004003du, 0x00000006u, 0x000000b1u,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000b3u, 0x000000b1u, 0x000000b2u,
0x000500c4u, 0x00000006u, 0x000000b5u, 0x000000b3u, 0x000000b4u, 0x0004003du,
0x00000006u, 0x000000b6u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000b8u,
0x000000b6u, 0x000000b7u, 0x000500c2u, 0x00000006u, 0x000000b9u, 0x000000b8u,
0x000000b4u, 0x000500c5u, 0x00000006u, 0x000000bau, 0x000000b5u, 0x000000b9u,
0x0003003eu, 0x00000019u, 0x000000bau, 0x0004003du, 0x00000006u, 0x000000bbu,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000bdu, 0x000000bbu, 0x000000bcu,
0x000500c4u, 0x00000006u, 0x000000bfu, 0x000000bdu, 0x000000beu, 0x0004003du,
0x00000006u, 0x000000c0u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000c2u,
0x000000c0u, 0x000000c1u, 0x000500c2u, 0x00000006u, 0x000000c3u, 0x000000c2u,
0x000000beu, 0x000500c5u, 0x00000006u, 0x000000c4u, 0x000000bfu, 0x000000c3u,
0x0003003eu, 0x00000019u, 0x000000c4u, 0x0004003du, 0x00000006u, 0x000000c5u,
0x00000019u, 0x000200feu, 0x000000c5u, 0x00010038u, 0x00050036u, 0x00000009u,
0x00000022u, 0x00000000u, 0x0000001fu, 0x00030037u, 0x0000001du, 0x00000020u,
0x00030037u, 0x0000001eu, 0x00000021u, 0x000200f8u, 0x00000023u, 0x0004003bu,
0x0000001eu, 0x000000c8u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000ccu,
0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000d0u, 0x00000007u, 0x0004003bu,
0x0000001eu, 0x000000d7u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000dbu,
0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000e7u, 0x00000007u, 0x0004003bu,
0x0000001eu, 0x000000ecu, 0x00000007u, 0x0004003du, 0x00000008u, 0x000000c9u,
0x00000021u, 0x0004003du, 0x00000008u, 0x000000cau, 0x00000021u, 0x00050085u,
0x00000008u, 0x000000cbu, 0x000000c9u, 0x000000cau, 0x0003003eu, 0x000000c8u,
0x000000cbu, 0x0004003du, 0x00000008u, 0x000000cdu, 0x000000c8u, 0x0004003du,
0x00000008u, 0x000000ceu, 0x000000c8u, 0x00050085u, 0x00000008u, 0x000000cfu,
0x000000cdu, 0x000000ceu, 0x0003003eu, 0x000000ccu, 0x000000cfu, 0x0004003du,
0x00000008u, 0x000000d1u, 0x000000ccu, 0x00050083u, 0x00000008u, 0x000000d2u,
0x000000d1u, 0x0000002eu, 0x00050041u, 0x0000001eu, 0x000000d3u, 0x00000020u,
0x0000006fu, 0x0004003du, 0x00000008u, 0x000000d4u, 0x000000d3u, 0x00050085u,
0x00000008u, 0x000000d5u, 0x000000d2u, 0x000000d4u, 0x00050081u, 0x00000008u,
0x000000d6u, 0x0000002eu, 0x000000d5u, 0x0003003eu, 0x000000d0u, 0x000000d6u,
0x0004003du, 0x00000008u, 0x000000d8u, 0x000000d0u, 0x000500bau, 0x0000006au,
0x000000dau, 0x000000d8u, 0x000000d9u, 0x000300f7u, 0x000000ddu, 0x00000000u,
0x000400fau, 0x000000dau, 0x000000dcu, 0x000000e5u, 0x000200f8u, 0x000000dcu,
0x00050041u, 0x0000001eu, 0x000000deu, 0x00000020u, 0x0000006fu, 0x0004003du,
0x00000008u, 0x000000dfu, 0x000000deu, 0x00050083u, 0x00000008u, 0x000000e0u,
0x0000002eu, 0x000000dfu, 0x0007000cu, 0x00000008u, 0x000000e1u, 0x00000001u,
0x00000028u, 0x000000e0u, 0x0000003au, 0x0004003du, 0x00000008u, 0x000000e2u,
0x000000d0u, 0x00050088u, 0x00000008u, 0x000000e3u, 0x000000e1u, 0x000000e2u,
0x0006000cu, 0x00000008u, 0x000000e4u, 0x00000001u, 0x0000001fu, 0x000000e3u,
0x0003003eu, 0x000000dbu, 0x000000e4u, 0x000200f9u, 0x000000ddu, 0x000200f8u,
0x000000e5u, 0x0003003eu, 0x000000dbu, 0x0000002eu, 0x000200f9u, 0x000000ddu,
0x000200f8u, 0x000000ddu, 0x0004003du, 0x00000008u, 0x000000e6u, 0x000000dbu,
0x0003003eu, 0x000000d7u, 0x000000e6u, 0x00050041u, 0x0000001eu, 0x000000e9u,
0x00000020u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x000000eau, 0x000000e9u,
0x00050085u, 0x00000008u, 0x000000ebu, 0x000000e8u, 0x000000eau, 0x0003003eu,
0x000000e7u, 0x000000ebu, 0x0004003du, 0x00000008u, 0x000000edu, 0x000000d7u,
0x0004003du, 0x00000008u, 0x000000eeu, 0x000000d7u, 0x00050085u, 0x00000008u,
0x000000efu, 0x000000edu, 0x000000eeu, 0x00050083u, 0x00000008u, 0x000000f0u,
0x0000002eu, 0x000000efu, 0x0007000cu, 0x00000008u, 0x000000f1u, 0x00000001u,
0x00000028u, 0x000000f0u, 0x0000003au, 0x0006000cu, 0x00000008u, 0x000000f2u,
0x00000001u, 0x0000001fu, 0x000000f1u, 0x0003003eu, 0x000000ecu, 0x000000f2u,
0x0004003du, 0x00000008u, 0x000000f3u, 0x000000ecu, 0x0004003du, 0x00000008u,
0x000000f4u, 0x000000e7u, 0x0006000cu, 0x00000008u, 0x000000f5u, 0x00000001u,
0x0000000eu, 0x000000f4u, 0x00050085u, 0x00000008u, 0x000000f6u, 0x000000f3u,
0x000000f5u, 0x0004003du, 0x00000008u, 0x000000f7u, 0x000000ecu, 0x0004003du,
0x00000008u, 0x000000f8u, 0x000000e7u, 0x0006000cu, 0x00000008u, 0x000000f9u,
0x00000001u, 0x0000000du, 0x000000f8u, 0x00050085u, 0x00000008u, 0x000000fau,
0x000000f7u, 0x000000f9u, 0x0004003du, 0x00000008u, 0x000000fbu, 0x000000d7u,
0x00060050u, 0x00000009u, 0x000000fcu, 0x000000f6u, 0x000000fau, 0x000000fbu,
0x000200feu, 0x000000fcu, 0x00010038u,
};
@@ -0,0 +1,130 @@
// skybox_frag.spv — 727 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S frag -o skybox_frag.spv skybox.frag
// then: python3 native/renderer/shaders/embed_spv.py skybox_frag.spv skybox_frag_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kSkybox_fragSpvWords = 727u;
inline constexpr std::uint32_t kSkybox_fragSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000072u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000004u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000cu, 0x00000015u, 0x00000060u,
0x0000006bu, 0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u,
0x000001ccu, 0x00080004u, 0x455f4c47u, 0x735f5458u, 0x616c6163u, 0x6c625f72u,
0x5f6b636fu, 0x6f79616cu, 0x00007475u, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00000076u, 0x00040005u, 0x0000000cu,
0x646e5f76u, 0x00000063u, 0x00030005u, 0x00000012u, 0x00000064u, 0x00040005u,
0x00000013u, 0x50796b53u, 0x00687375u, 0x00060006u, 0x00000013u, 0x00000000u,
0x5f766e69u, 0x77656976u, 0x0000305fu, 0x00060006u, 0x00000013u, 0x00000001u,
0x5f766e69u, 0x77656976u, 0x0000315fu, 0x00060006u, 0x00000013u, 0x00000002u,
0x5f766e69u, 0x77656976u, 0x0000325fu, 0x00060006u, 0x00000013u, 0x00000003u,
0x5f766e69u, 0x77656976u, 0x0000335fu, 0x00060006u, 0x00000013u, 0x00000004u,
0x5f766e69u, 0x77656976u, 0x0000345fu, 0x00060006u, 0x00000013u, 0x00000005u,
0x5f766e69u, 0x77656976u, 0x0000355fu, 0x00060006u, 0x00000013u, 0x00000006u,
0x5f766e69u, 0x77656976u, 0x0000365fu, 0x00060006u, 0x00000013u, 0x00000007u,
0x5f766e69u, 0x77656976u, 0x0000375fu, 0x00060006u, 0x00000013u, 0x00000008u,
0x5f766e69u, 0x77656976u, 0x0000385fu, 0x00060006u, 0x00000013u, 0x00000009u,
0x6f707865u, 0x65727573u, 0x00000000u, 0x00040005u, 0x00000015u, 0x75705f67u,
0x00006873u, 0x00030005u, 0x0000005cu, 0x00726468u, 0x00040005u, 0x00000060u,
0x6b735f75u, 0x00000079u, 0x00040005u, 0x0000006bu, 0x6f635f6fu, 0x00726f6cu,
0x00040047u, 0x0000000cu, 0x0000001eu, 0x00000000u, 0x00030047u, 0x00000013u,
0x00000002u, 0x00050048u, 0x00000013u, 0x00000000u, 0x00000023u, 0x00000000u,
0x00050048u, 0x00000013u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u,
0x00000013u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000013u,
0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000013u, 0x00000004u,
0x00000023u, 0x00000010u, 0x00050048u, 0x00000013u, 0x00000005u, 0x00000023u,
0x00000014u, 0x00050048u, 0x00000013u, 0x00000006u, 0x00000023u, 0x00000018u,
0x00050048u, 0x00000013u, 0x00000007u, 0x00000023u, 0x0000001cu, 0x00050048u,
0x00000013u, 0x00000008u, 0x00000023u, 0x00000020u, 0x00050048u, 0x00000013u,
0x00000009u, 0x00000023u, 0x00000024u, 0x00040047u, 0x00000060u, 0x00000021u,
0x00000000u, 0x00040047u, 0x00000060u, 0x00000022u, 0x00000000u, 0x00040047u,
0x0000006bu, 0x0000001eu, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x00040017u, 0x0000000au, 0x00000006u, 0x00000002u, 0x00040020u,
0x0000000bu, 0x00000001u, 0x0000000au, 0x0004003bu, 0x0000000bu, 0x0000000cu,
0x00000001u, 0x0004002bu, 0x00000006u, 0x0000000eu, 0xbf800000u, 0x000c001eu,
0x00000013u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u,
0x00000014u, 0x00000009u, 0x00000013u, 0x0004003bu, 0x00000014u, 0x00000015u,
0x00000009u, 0x00040015u, 0x00000016u, 0x00000020u, 0x00000001u, 0x0004002bu,
0x00000016u, 0x00000017u, 0x00000000u, 0x00040020u, 0x00000018u, 0x00000009u,
0x00000006u, 0x00040015u, 0x0000001bu, 0x00000020u, 0x00000000u, 0x0004002bu,
0x0000001bu, 0x0000001cu, 0x00000000u, 0x00040020u, 0x0000001du, 0x00000007u,
0x00000006u, 0x0004002bu, 0x00000016u, 0x00000021u, 0x00000001u, 0x0004002bu,
0x0000001bu, 0x00000024u, 0x00000001u, 0x0004002bu, 0x00000016u, 0x00000029u,
0x00000002u, 0x0004002bu, 0x0000001bu, 0x0000002cu, 0x00000002u, 0x0004002bu,
0x00000016u, 0x00000031u, 0x00000003u, 0x0004002bu, 0x00000016u, 0x00000037u,
0x00000004u, 0x0004002bu, 0x00000016u, 0x0000003eu, 0x00000005u, 0x0004002bu,
0x00000016u, 0x00000045u, 0x00000006u, 0x0004002bu, 0x00000016u, 0x0000004bu,
0x00000007u, 0x0004002bu, 0x00000016u, 0x00000052u, 0x00000008u, 0x00090019u,
0x0000005du, 0x00000006u, 0x00000003u, 0x00000000u, 0x00000000u, 0x00000000u,
0x00000001u, 0x00000000u, 0x0003001bu, 0x0000005eu, 0x0000005du, 0x00040020u,
0x0000005fu, 0x00000000u, 0x0000005eu, 0x0004003bu, 0x0000005fu, 0x00000060u,
0x00000000u, 0x00040017u, 0x00000063u, 0x00000006u, 0x00000004u, 0x0004002bu,
0x00000016u, 0x00000066u, 0x00000009u, 0x00040020u, 0x0000006au, 0x00000003u,
0x00000063u, 0x0004003bu, 0x0000006au, 0x0000006bu, 0x00000003u, 0x0004002bu,
0x00000006u, 0x0000006du, 0x3f800000u, 0x00050036u, 0x00000002u, 0x00000004u,
0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000008u,
0x00000009u, 0x00000007u, 0x0004003bu, 0x00000008u, 0x00000012u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x0000005cu, 0x00000007u, 0x0004003du, 0x0000000au,
0x0000000du, 0x0000000cu, 0x00050051u, 0x00000006u, 0x0000000fu, 0x0000000du,
0x00000000u, 0x00050051u, 0x00000006u, 0x00000010u, 0x0000000du, 0x00000001u,
0x00060050u, 0x00000007u, 0x00000011u, 0x0000000fu, 0x00000010u, 0x0000000eu,
0x0003003eu, 0x00000009u, 0x00000011u, 0x00050041u, 0x00000018u, 0x00000019u,
0x00000015u, 0x00000017u, 0x0004003du, 0x00000006u, 0x0000001au, 0x00000019u,
0x00050041u, 0x0000001du, 0x0000001eu, 0x00000009u, 0x0000001cu, 0x0004003du,
0x00000006u, 0x0000001fu, 0x0000001eu, 0x00050085u, 0x00000006u, 0x00000020u,
0x0000001au, 0x0000001fu, 0x00050041u, 0x00000018u, 0x00000022u, 0x00000015u,
0x00000021u, 0x0004003du, 0x00000006u, 0x00000023u, 0x00000022u, 0x00050041u,
0x0000001du, 0x00000025u, 0x00000009u, 0x00000024u, 0x0004003du, 0x00000006u,
0x00000026u, 0x00000025u, 0x00050085u, 0x00000006u, 0x00000027u, 0x00000023u,
0x00000026u, 0x00050081u, 0x00000006u, 0x00000028u, 0x00000020u, 0x00000027u,
0x00050041u, 0x00000018u, 0x0000002au, 0x00000015u, 0x00000029u, 0x0004003du,
0x00000006u, 0x0000002bu, 0x0000002au, 0x00050041u, 0x0000001du, 0x0000002du,
0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x0000002eu, 0x0000002du,
0x00050085u, 0x00000006u, 0x0000002fu, 0x0000002bu, 0x0000002eu, 0x00050081u,
0x00000006u, 0x00000030u, 0x00000028u, 0x0000002fu, 0x00050041u, 0x00000018u,
0x00000032u, 0x00000015u, 0x00000031u, 0x0004003du, 0x00000006u, 0x00000033u,
0x00000032u, 0x00050041u, 0x0000001du, 0x00000034u, 0x00000009u, 0x0000001cu,
0x0004003du, 0x00000006u, 0x00000035u, 0x00000034u, 0x00050085u, 0x00000006u,
0x00000036u, 0x00000033u, 0x00000035u, 0x00050041u, 0x00000018u, 0x00000038u,
0x00000015u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000039u, 0x00000038u,
0x00050041u, 0x0000001du, 0x0000003au, 0x00000009u, 0x00000024u, 0x0004003du,
0x00000006u, 0x0000003bu, 0x0000003au, 0x00050085u, 0x00000006u, 0x0000003cu,
0x00000039u, 0x0000003bu, 0x00050081u, 0x00000006u, 0x0000003du, 0x00000036u,
0x0000003cu, 0x00050041u, 0x00000018u, 0x0000003fu, 0x00000015u, 0x0000003eu,
0x0004003du, 0x00000006u, 0x00000040u, 0x0000003fu, 0x00050041u, 0x0000001du,
0x00000041u, 0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x00000042u,
0x00000041u, 0x00050085u, 0x00000006u, 0x00000043u, 0x00000040u, 0x00000042u,
0x00050081u, 0x00000006u, 0x00000044u, 0x0000003du, 0x00000043u, 0x00050041u,
0x00000018u, 0x00000046u, 0x00000015u, 0x00000045u, 0x0004003du, 0x00000006u,
0x00000047u, 0x00000046u, 0x00050041u, 0x0000001du, 0x00000048u, 0x00000009u,
0x0000001cu, 0x0004003du, 0x00000006u, 0x00000049u, 0x00000048u, 0x00050085u,
0x00000006u, 0x0000004au, 0x00000047u, 0x00000049u, 0x00050041u, 0x00000018u,
0x0000004cu, 0x00000015u, 0x0000004bu, 0x0004003du, 0x00000006u, 0x0000004du,
0x0000004cu, 0x00050041u, 0x0000001du, 0x0000004eu, 0x00000009u, 0x00000024u,
0x0004003du, 0x00000006u, 0x0000004fu, 0x0000004eu, 0x00050085u, 0x00000006u,
0x00000050u, 0x0000004du, 0x0000004fu, 0x00050081u, 0x00000006u, 0x00000051u,
0x0000004au, 0x00000050u, 0x00050041u, 0x00000018u, 0x00000053u, 0x00000015u,
0x00000052u, 0x0004003du, 0x00000006u, 0x00000054u, 0x00000053u, 0x00050041u,
0x0000001du, 0x00000055u, 0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u,
0x00000056u, 0x00000055u, 0x00050085u, 0x00000006u, 0x00000057u, 0x00000054u,
0x00000056u, 0x00050081u, 0x00000006u, 0x00000058u, 0x00000051u, 0x00000057u,
0x00060050u, 0x00000007u, 0x00000059u, 0x00000030u, 0x00000044u, 0x00000058u,
0x0003003eu, 0x00000012u, 0x00000059u, 0x0004003du, 0x00000007u, 0x0000005au,
0x00000012u, 0x0006000cu, 0x00000007u, 0x0000005bu, 0x00000001u, 0x00000045u,
0x0000005au, 0x0003003eu, 0x00000012u, 0x0000005bu, 0x0004003du, 0x0000005eu,
0x00000061u, 0x00000060u, 0x0004003du, 0x00000007u, 0x00000062u, 0x00000012u,
0x00050057u, 0x00000063u, 0x00000064u, 0x00000061u, 0x00000062u, 0x0008004fu,
0x00000007u, 0x00000065u, 0x00000064u, 0x00000064u, 0x00000000u, 0x00000001u,
0x00000002u, 0x00050041u, 0x00000018u, 0x00000067u, 0x00000015u, 0x00000066u,
0x0004003du, 0x00000006u, 0x00000068u, 0x00000067u, 0x0005008eu, 0x00000007u,
0x00000069u, 0x00000065u, 0x00000068u, 0x0003003eu, 0x0000005cu, 0x00000069u,
0x0004003du, 0x00000007u, 0x0000006cu, 0x0000005cu, 0x00050051u, 0x00000006u,
0x0000006eu, 0x0000006cu, 0x00000000u, 0x00050051u, 0x00000006u, 0x0000006fu,
0x0000006cu, 0x00000001u, 0x00050051u, 0x00000006u, 0x00000070u, 0x0000006cu,
0x00000002u, 0x00070050u, 0x00000063u, 0x00000071u, 0x0000006eu, 0x0000006fu,
0x00000070u, 0x0000006du, 0x0003003eu, 0x0000006bu, 0x00000071u, 0x000100fdu,
0x00010038u,
};
@@ -0,0 +1,65 @@
// skybox_vert.spv — 340 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S vert -o skybox_vert.spv skybox.vert
// then: python3 native/renderer/shaders/embed_spv.py skybox_vert.spv skybox_vert_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kSkybox_vertSpvWords = 340u;
inline constexpr std::uint32_t kSkybox_vertSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000032u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0008000fu, 0x00000000u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000eu, 0x00000022u, 0x0000002au,
0x00030003u, 0x00000002u, 0x000001ccu, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00736f70u, 0x00060005u, 0x0000000eu,
0x565f6c67u, 0x65747265u, 0x646e4978u, 0x00007865u, 0x00040005u, 0x00000022u,
0x646e5f76u, 0x00000063u, 0x00060005u, 0x00000028u, 0x505f6c67u, 0x65567265u,
0x78657472u, 0x00000000u, 0x00060006u, 0x00000028u, 0x00000000u, 0x505f6c67u,
0x7469736fu, 0x006e6f69u, 0x00070006u, 0x00000028u, 0x00000001u, 0x505f6c67u,
0x746e696fu, 0x657a6953u, 0x00000000u, 0x00070006u, 0x00000028u, 0x00000002u,
0x435f6c67u, 0x4470696cu, 0x61747369u, 0x0065636eu, 0x00070006u, 0x00000028u,
0x00000003u, 0x435f6c67u, 0x446c6c75u, 0x61747369u, 0x0065636eu, 0x00030005u,
0x0000002au, 0x00000000u, 0x00040047u, 0x0000000eu, 0x0000000bu, 0x0000002au,
0x00040047u, 0x00000022u, 0x0000001eu, 0x00000000u, 0x00030047u, 0x00000028u,
0x00000002u, 0x00050048u, 0x00000028u, 0x00000000u, 0x0000000bu, 0x00000000u,
0x00050048u, 0x00000028u, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u,
0x00000028u, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x00000028u,
0x00000003u, 0x0000000bu, 0x00000004u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x0004002bu, 0x00000006u, 0x0000000au, 0x00000000u, 0x0005002cu,
0x00000007u, 0x0000000bu, 0x0000000au, 0x0000000au, 0x00040015u, 0x0000000cu,
0x00000020u, 0x00000001u, 0x00040020u, 0x0000000du, 0x00000001u, 0x0000000cu,
0x0004003bu, 0x0000000du, 0x0000000eu, 0x00000001u, 0x0004002bu, 0x0000000cu,
0x00000010u, 0x00000000u, 0x00020014u, 0x00000011u, 0x0004002bu, 0x00000006u,
0x00000015u, 0xbf800000u, 0x0005002cu, 0x00000007u, 0x00000016u, 0x00000015u,
0x00000015u, 0x0004002bu, 0x0000000cu, 0x00000019u, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000001du, 0x40400000u, 0x0005002cu, 0x00000007u, 0x0000001eu,
0x0000001du, 0x00000015u, 0x0005002cu, 0x00000007u, 0x00000020u, 0x00000015u,
0x0000001du, 0x00040020u, 0x00000021u, 0x00000003u, 0x00000007u, 0x0004003bu,
0x00000021u, 0x00000022u, 0x00000003u, 0x00040017u, 0x00000024u, 0x00000006u,
0x00000004u, 0x00040015u, 0x00000025u, 0x00000020u, 0x00000000u, 0x0004002bu,
0x00000025u, 0x00000026u, 0x00000001u, 0x0004001cu, 0x00000027u, 0x00000006u,
0x00000026u, 0x0006001eu, 0x00000028u, 0x00000024u, 0x00000006u, 0x00000027u,
0x00000027u, 0x00040020u, 0x00000029u, 0x00000003u, 0x00000028u, 0x0004003bu,
0x00000029u, 0x0000002au, 0x00000003u, 0x0004002bu, 0x00000006u, 0x0000002cu,
0x3f800000u, 0x00040020u, 0x00000030u, 0x00000003u, 0x00000024u, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000008u, 0x00000009u, 0x00000007u, 0x0003003eu, 0x00000009u,
0x0000000bu, 0x0004003du, 0x0000000cu, 0x0000000fu, 0x0000000eu, 0x000500aau,
0x00000011u, 0x00000012u, 0x0000000fu, 0x00000010u, 0x000300f7u, 0x00000014u,
0x00000000u, 0x000400fau, 0x00000012u, 0x00000013u, 0x00000017u, 0x000200f8u,
0x00000013u, 0x0003003eu, 0x00000009u, 0x00000016u, 0x000200f9u, 0x00000014u,
0x000200f8u, 0x00000017u, 0x0004003du, 0x0000000cu, 0x00000018u, 0x0000000eu,
0x000500aau, 0x00000011u, 0x0000001au, 0x00000018u, 0x00000019u, 0x000300f7u,
0x0000001cu, 0x00000000u, 0x000400fau, 0x0000001au, 0x0000001bu, 0x0000001fu,
0x000200f8u, 0x0000001bu, 0x0003003eu, 0x00000009u, 0x0000001eu, 0x000200f9u,
0x0000001cu, 0x000200f8u, 0x0000001fu, 0x0003003eu, 0x00000009u, 0x00000020u,
0x000200f9u, 0x0000001cu, 0x000200f8u, 0x0000001cu, 0x000200f9u, 0x00000014u,
0x000200f8u, 0x00000014u, 0x0004003du, 0x00000007u, 0x00000023u, 0x00000009u,
0x0003003eu, 0x00000022u, 0x00000023u, 0x0004003du, 0x00000007u, 0x0000002bu,
0x00000009u, 0x00050051u, 0x00000006u, 0x0000002du, 0x0000002bu, 0x00000000u,
0x00050051u, 0x00000006u, 0x0000002eu, 0x0000002bu, 0x00000001u, 0x00070050u,
0x00000024u, 0x0000002fu, 0x0000002du, 0x0000002eu, 0x0000002cu, 0x0000002cu,
0x00050041u, 0x00000030u, 0x00000031u, 0x0000002au, 0x00000010u, 0x0003003eu,
0x00000031u, 0x0000002fu, 0x000100fdu, 0x00010038u,
};
@@ -0,0 +1,322 @@
// skybox_ibl.hpp — P4-05: diffuse irradiance + specular prefilter + skybox/PBR IBL.
//
// Import-time IBL generation from the P4-05 cubemap (t_933284d7) using the
// BRDF LUT contract (t_20b358bd, binding 6). This header owns ONLY the
// CPU-side surface + shared math; it creates no Vulkan objects and compiles
// without the SDK (like skybox_image_based_lighting.hpp / brdf_lut.hpp).
//
// Pipeline (all linear HDR, no sRGB anywhere — P4-02 tonemaps at frame time):
// equirect .hdr --[equirect_to_cube.comp]--> cubemap (RGBA32F, 6 layers)
// --[irradiance.comp]--> irradiance map (RGBA32F cube, 32px, 1 mip)
// --[prefilter.comp]--> prefiltered map (RGBA32F cube, N mips, mip = rough)
// --[brdf_lut.comp]--> BRDF LUT (RG32F 2D, binding 6)
// frame: skybox.vert/frag samples cubemap; PBR evaluates
// diffuse = albedo * irradiance(N) (Lambert, metals 0)
// specular = prefiltered(R, rough) * (F0 * scale + bias)
// with (scale, bias) = brdf_lut(NdotV, rough), F0 = mix(0.04, albedo, metal).
//
// Format contract:
// - Irradiance: R32G32B32A32_SFLOAT cube, 6 layers, 1 mip, alpha 1.
// - Prefilter: R32G32B32A32_SFLOAT cube, 6 layers, mip chain down to 1px
// (mip_count = floor(log2(edge)) + 1, same layout rules as mipmaps).
// Storage-image writes need one descriptor per mip (image2DArray views
// are per-mip), but the CPU contract here only fixes sizes/counts.
// - Sampling: CLAMP_TO_EDGE in all axes for both maps (no wrap: cubemap
// faces carry their own edge continuity via SkyboxFaceDir); LINEAR
// filter, LINEAR_MIPMAP_LINEAR for the prefilter (roughness -> mip).
// - Bindings (set 0, coordinated with brdf_lut.hpp): irradiance = 7,
// prefiltered = 8. (0..5 taken by scene/material/textures/samplers/
// visibility/lights-grid/index per pbr_shade.slang comment; 6 = BRDF
// LUT.) The compute shaders use their own throwaway set-0 layouts
// (binding 0 = source cube sampler, binding 1 = dest storage image);
// these numbers are the SAMPLED slots in the PBR/skybox frame set.
//
// Face convention: identical to skybox_image_based_lighting.hpp
// (SkyboxFaceDir, +X -X +Y -Y +Z -Z layer order, y-down texel rows).
#pragma once
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
namespace engine::renderer {
// Default import sizes (spec P4-05: irradiance low-res, prefilter from cube).
inline constexpr std::uint32_t kIrradianceFaceSize = 32;
inline constexpr std::uint32_t kIrradianceMin = 8;
inline constexpr std::uint32_t kIrradianceMax = 128;
// Prefilter base edge matches the source cubemap edge (spec default 512,
// test sizes smaller); mips run to 1px.
inline constexpr std::uint32_t kPrefilterMin = 16;
inline constexpr std::uint32_t kPrefilterMax = 2048;
// Importance-sample counts shared by CPU ref and compute shaders.
// Irradiance uses FEWER samples (diffuse kernel is smooth): 512.
// Prefilter matches the BRDF LUT: 1024.
inline constexpr std::uint32_t kIrradianceSamples = 512;
inline constexpr std::uint32_t kPrefilterSamples = 1024;
// Frame-set sampled binding slots (set 0).
inline constexpr std::uint32_t kIblIrradianceBinding = 7;
inline constexpr std::uint32_t kIblPrefilterBinding = 8;
// --- Irradiance import params ----------------------------------------------
// face_size 0 = default kIrradianceFaceSize.
struct IrradianceImportParams {
std::uint32_t face_size{0};
};
struct IrradianceImportPlan {
std::uint32_t face_size{kIrradianceFaceSize};
std::uint64_t total_bytes{0}; // face^2 * 16 * 6
};
[[nodiscard]] inline auto IrradianceValidateImport(
const IrradianceImportParams& p, IrradianceImportPlan* out) noexcept
-> bool {
if (out == nullptr) {
return false;
}
const std::uint32_t face =
(p.face_size != 0) ? p.face_size : kIrradianceFaceSize;
if (face < kIrradianceMin || face > kIrradianceMax) {
return false;
}
out->face_size = face;
out->total_bytes =
static_cast<std::uint64_t>(face) * static_cast<std::uint64_t>(face) *
16u * 6u;
return true;
}
// --- Prefilter import params ------------------------------------------------
// base_size 0 = source cubemap edge (import-time: kSkyboxCubemapSize 512).
struct PrefilterImportParams {
std::uint32_t base_size{0};
};
struct PrefilterImportPlan {
std::uint32_t base_size{512};
std::uint32_t mip_count{0}; // floor(log2(base)) + 1
std::uint64_t total_bytes{0}; // sum over mips of edge^2 * 16 * 6
};
[[nodiscard]] inline auto PrefilterMipCount(std::uint32_t base) noexcept
-> std::uint32_t {
if (base == 0) {
return 0;
}
std::uint32_t n = 0;
while (base > 0) {
++n;
base >>= 1;
}
return n;
}
[[nodiscard]] inline auto PrefilterValidateImport(const PrefilterImportParams& p,
PrefilterImportPlan* out) noexcept
-> bool {
if (out == nullptr) {
return false;
}
const std::uint32_t base = (p.base_size != 0) ? p.base_size : 512u;
if (base < kPrefilterMin || base > kPrefilterMax) {
return false;
}
out->base_size = base;
out->mip_count = PrefilterMipCount(base);
std::uint64_t bytes = 0;
std::uint32_t edge = base;
for (std::uint32_t m = 0; m < out->mip_count; ++m) {
bytes += static_cast<std::uint64_t>(edge) * edge * 16u * 6u;
edge = (edge > 1) ? (edge >> 1) : 1;
}
out->total_bytes = bytes;
return true;
}
// Mip edge + roughness mapping: mip m of a base-edge chain has
// edge = max(base >> m, 1) and roughness = m / (mip_count - 1)
// (mip 0 = smooth mirror, last mip = fully rough). Single-mip chain
// (base 1, never valid here) would map to rough 0.
[[nodiscard]] inline auto PrefilterMipRoughness(std::uint32_t mip,
std::uint32_t mip_count) noexcept
-> float {
if (mip_count <= 1) {
return 0.0F;
}
if (mip >= mip_count) {
return 1.0F;
}
return static_cast<float>(mip) / static_cast<float>(mip_count - 1);
}
inline auto PrefilterMipEdge(std::uint32_t base, std::uint32_t mip) noexcept
-> std::uint32_t {
std::uint32_t edge = base >> mip;
return (edge == 0) ? 1 : edge;
}
// --- Shared sampling math ---------------------------------------------------
// Cosine-weighted hemisphere sample about +Z (irradiance kernel):
// u1 = uniform, u2 = uniform -> dir with pdf = cos/sqrt(pi)-free form.
// Matches irradiance.comp term for term.
inline auto IblCosineSample(float u1, float u2, float out[3]) noexcept -> void {
constexpr float kPi = 3.141592653589793F;
const float r = std::sqrt(u1 > 0.0F ? u1 : 0.0F);
const float phi = 2.0F * kPi * u2;
out[0] = r * std::cos(phi);
out[1] = r * std::sin(phi);
out[2] = std::sqrt(1.0F - (u1 < 1.0F ? u1 : 1.0F));
}
// Build an orthonormal basis about normal n (n unit). t/b are unit and
// orthogonal to n. Matches both compute shaders (Frisvad branchless-free
// form: pick the axis least aligned with n).
inline auto IblBasis(const float n[3], float t[3], float b[3]) noexcept
-> void {
float ax = 0.0F;
float ay = 0.0F;
float az = 0.0F;
const float anx = (n[0] < 0.0F ? -n[0] : n[0]);
const float any = (n[1] < 0.0F ? -n[1] : n[1]);
const float anz = (n[2] < 0.0F ? -n[2] : n[2]);
if (anx < any && anx < anz) {
ax = 1.0F;
} else if (any < anz) {
ay = 1.0F;
} else {
az = 1.0F;
}
// t = normalize(cross(n, a)).
float tx = n[1] * az - n[2] * ay;
float ty = n[2] * ax - n[0] * az;
float tz = n[0] * ay - n[1] * ax;
const float tl = std::sqrt(tx * tx + ty * ty + tz * tz);
if (tl > 1e-7F) {
tx /= tl;
ty /= tl;
tz /= tl;
}
// b = cross(n, t).
t[0] = tx;
t[1] = ty;
t[2] = tz;
b[0] = n[1] * tz - n[2] * ty;
b[1] = n[2] * tx - n[0] * tz;
b[2] = n[0] * ty - n[1] * tx;
}
// Normal -> equirect-free ambient probe: cosine-weighted average of a
// procedural sky function over the hemisphere. `sample_sky(dir, rgb)` is
// the caller's sky radiance (test: analytic gradient; production: cubemap
// sample). sample_count 0 = default kIrradianceSamples. Out is irradiance
// (already includes the 1/pi... no: returns the MEAN radiance * pi, i.e.
// the diffuse irradiance for a Lambert term albedo * irr / pi? No —
// returns irradiance E = mean * pi so the shader does albedo * E / pi).
// We return E directly: shader divides by pi once.
template <typename SkyFn>
inline auto IblIrradianceReference(const float n[3], std::uint32_t sample_count,
SkyFn sample_sky, float out[3]) noexcept
-> void {
const std::uint32_t count =
(sample_count != 0) ? sample_count : kIrradianceSamples;
float t[3] = {1.0F, 0.0F, 0.0F};
float b[3] = {0.0F, 0.0F, 1.0F};
IblBasis(n, t, b);
double acc[3] = {0.0, 0.0, 0.0};
for (std::uint32_t i = 0; i < count; ++i) {
// Stratified jitter (Hammersley-like without VdC: deterministic grid +
// golden-ratio offset keeps the CPU ref dependency-free).
const float u1 =
(static_cast<float>(i) + 0.5F) / static_cast<float>(count);
float u2 = static_cast<float>(i) * 0.618033988749895F;
u2 = u2 - std::floor(u2);
float h[3] = {0.0F, 0.0F, 1.0F};
IblCosineSample(u1, u2, h);
// World dir = t*h.x + b*h.y + n*h.z.
float d[3] = {t[0] * h[0] + b[0] * h[1] + n[0] * h[2],
t[1] * h[0] + b[1] * h[1] + n[1] * h[2],
t[2] * h[0] + b[2] * h[1] + n[2] * h[2]};
float rgb[3] = {0.0F, 0.0F, 0.0F};
sample_sky(d, rgb);
acc[0] += rgb[0];
acc[1] += rgb[1];
acc[2] += rgb[2];
}
constexpr float kPi = 3.141592653589793F;
const float k = kPi / static_cast<float>(count);
out[0] = static_cast<float>(acc[0] * k);
out[1] = static_cast<float>(acc[1] * k);
out[2] = static_cast<float>(acc[2] * k);
}
// --- Split-sum IBL evaluation (frame shader reference) -----------------------
// Reconstructs specular IBL from the prefiltered sample + LUT:
// spec = prefiltered * (f0 * scale + bias)
// diff = albedo * (1 - metal) * irradiance / pi
// ibl = diff + spec
// All linear HDR. Mirrors the PBR wiring the sibling test renders.
inline auto IblEvaluate(float albedo_r, float albedo_g, float albedo_b,
float metal, float ndv, float rough, float irr_r,
float irr_g, float irr_b, float pref_r, float pref_g,
float pref_b, float lut_scale, float lut_bias,
float out[3]) noexcept -> void {
constexpr float kPi = 3.141592653589793F;
const float m = (metal < 0.0F ? 0.0F : (metal > 1.0F ? 1.0F : metal));
// F0 = mix(0.04 dielectric, albedo, metal).
const float f0r = 0.04F + (albedo_r - 0.04F) * m;
const float f0g = 0.04F + (albedo_g - 0.04F) * m;
const float f0b = 0.04F + (albedo_b - 0.04F) * m;
const float k = (1.0F - m) / kPi;
const float dr = albedo_r * k * irr_r;
const float dg = albedo_g * k * irr_g;
const float db = albedo_b * k * irr_b;
const float sr = pref_r * (f0r * lut_scale + lut_bias);
const float sg = pref_g * (f0g * lut_scale + lut_bias);
const float sb = pref_b * (f0b * lut_scale + lut_bias);
(void)ndv;
(void)rough;
out[0] = dr + sr;
out[1] = dg + sg;
out[2] = db + sb;
}
// --- Skybox view math ----------------------------------------------------------
// Fullscreen-triangle skybox: clip = (ndc.xy, 1, 1) pushed to the far plane
// (depth = w, i.e. NDC z = 1 with depth-compare LESS... production uses
// GREATER/EQUAL or depth-write-off + draw-first; the test draws skybox
// first with depthWrite OFF and depthTest ALWAYS so sphere pixels always
// overwrite). View ray in world space: dir = normalize(inv_view_rot * v),
// where v = (ndc.x * tan(fovx/2) * aspect... ) — the test passes NDC and
// the inverse view-projection WITHOUT translation; this helper applies
// the 3x3 (rotation-only) part of a row-major 4x4 to an NDC direction.
inline auto SkyboxViewDir(const float inv_view_3x3[9], float ndc_x,
float ndc_y, float out[3]) noexcept -> void {
// View-space ray for a perspective camera looking down -Z with
// focal length folded into the inverse matrix: out = M * (ndc_x, ndc_y, -1).
const float vx = ndc_x;
const float vy = ndc_y;
const float vz = -1.0F;
float dx = inv_view_3x3[0] * vx + inv_view_3x3[1] * vy +
inv_view_3x3[2] * vz;
float dy = inv_view_3x3[3] * vx + inv_view_3x3[4] * vy +
inv_view_3x3[5] * vz;
float dz = inv_view_3x3[6] * vx + inv_view_3x3[7] * vy +
inv_view_3x3[8] * vz;
const float len = std::sqrt(dx * dx + dy * dy + dz * dz);
if (len > 1e-7F) {
dx /= len;
dy /= len;
dz /= len;
}
out[0] = dx;
out[1] = dy;
out[2] = dz;
}
// RGBA/BGRA swizzle note (gotcha 23): swapchain goldens on lavapipe come
// back B8G8R8A8 while our maps are RGBA32F. The test swizzles R<->B when
// writing PNGs / comparing readbacks — never swizzle the HDR maps.
} // namespace engine::renderer
@@ -0,0 +1,256 @@
// skybox_image_based_lighting.hpp — P4-05: equirect HDR import + GPU cubemap conversion.
//
// Import-time path for HDR sky import. The HDR decode reuses the existing
// M5-01 texture pipeline (stb_image via the assets module: stbi_loadf /
// stbi_is_hdr — no new decoder, no CPU fallback beyond what the pipeline
// already does). This header owns what that pipeline does NOT:
//
// 1. HDR pixel validation + metadata (HdrSkyImage): width/height/channels
// checks on the decoded float buffer, no allocation, no decode here.
// 2. Equirect -> cubemap direction math (SkyboxFaceDir): the per-face,
// per-texel cubemap direction used by BOTH the GPU compute shader
// (equirect_to_cube.comp) and the CPU reference in the test. One
// function, bit-exact contract, so face orientation can never drift
// between CPU and GPU.
// 3. Equirect sampling reference (SkyboxSampleEquirectCpu): bilinear
// sample of the float equirect buffer at a direction. The GPU shader
// uses hardware bilinear (sampler) on the same buffer; the CPU test
// compares within a tolerance for the hardware-filter difference.
// 4. Import parameters (SkyboxImportParams): cubemap edge size (spec
// default 512) and format contract (R32G32B32A32_SFLOAT storage —
// see format notes below).
//
// Vulkan cubemap + compute dispatch + irradiance/prefilter/BRDF-LUT live
// in the sibling tasks on this same branch (t_04b48e31 / t_20b358bd).
// This header exposes ONLY the import-time CPU surface plus the shared
// direction math; it creates no Vulkan objects and needs no SDK.
//
// Format contract (shared with the GPU/IBL tasks):
// - Cubemap storage is R32G32B32A32_SFLOAT, 6 layers, one mip. RGBA32F
// (not RGB32F) because Vulkan has no widely-supported RGB32F STORAGE
// image format without extra feature queries; alpha carries 1.0.
// Linear HDR throughout: no sRGB decode on import (Radiance .hdr is
// already linear), no sRGB encode on the cubemap (the P4-02 post
// pass does ACES + sRGB at frame time).
// - Equirect upload is R32G32B32A32_SFLOAT too (floats straight from
// stbi_loadf, alpha padded to 1.0) so the compute shader samples
// with a REPEAT-U / CLAMP-V linear sampler (equirect wraps in
// longitude, clamps at the poles) on the same buffer.
//
// Face convention (shared with equirect_to_cube.comp; Vulkan cubemap
// layer order 0..5 = +X -X +Y -Y +Z -Z):
// face 0 (+X): dir = normalize(+1, -v, -u)
// face 1 (-X): dir = normalize(-1, -v, +u)
// face 2 (+Y): dir = normalize(+u, +1, +v)
// face 3 (-Y): dir = normalize(+u, -1, -v)
// face 4 (+Z): dir = normalize(+u, -v, +1)
// face 5 (-Z): dir = normalize(-u, -v, -1)
// where (u, v) in [-1, 1] map from texel centers. +Y is up, so the sky
// zenith lands at the middle of the equirect's top row. Verified against
// the CPU reference in test_skybox_import.cpp: face centers map to the
// six axis directions, and adjacent face edges share directions (no
// seams from orientation bugs).
//
// Compiles WITHOUT the Vulkan SDK (plain data + math, no GPU) so the
// CPU contract tests run on every CI runner, like hdr_camera.hpp.
#pragma once
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
namespace engine::renderer {
// Default cubemap edge in texels (spec P4-05: 512).
inline constexpr std::uint32_t kSkyboxCubemapSize = 512;
// Minimum/maximum sane cubemap edges (import rejects outside).
inline constexpr std::uint32_t kSkyboxCubemapMin = 16;
inline constexpr std::uint32_t kSkyboxCubemapMax = 2048;
// Equirect aspect expected from Radiance .hdr skies (2:1). Import does
// not reject other aspects, but the test's synthetic sky uses 2:1.
inline constexpr std::uint32_t kSkyboxEquirectAspect = 2;
// Face indices in Vulkan cubemap layer order.
inline constexpr std::uint32_t kSkyboxFaceCount = 6;
// Import parameters: cubemap edge + equirect extent. face_size 0 means
// "use kSkyboxCubemapSize".
struct SkyboxImportParams {
std::uint32_t face_size{0};
std::uint32_t equirect_w{0};
std::uint32_t equirect_h{0};
};
// Validated import plan: resolved face size + layer count. validate
// returns false (out untouched) on null args, zero equirect extent, or
// face size outside [kSkyboxCubemapMin, kSkyboxCubemapMax].
struct SkyboxImportPlan {
std::uint32_t face_size{kSkyboxCubemapSize};
std::uint32_t layer_count{kSkyboxFaceCount};
std::uint64_t face_bytes{0}; // face_size^2 * 16 (RGBA32F)
};
[[nodiscard]] inline auto SkyboxValidateImport(const SkyboxImportParams& p,
SkyboxImportPlan* out) noexcept
-> bool {
if (out == nullptr) {
return false;
}
if (p.equirect_w == 0 || p.equirect_h == 0) {
return false;
}
const std::uint32_t face =
(p.face_size != 0) ? p.face_size : kSkyboxCubemapSize;
if (face < kSkyboxCubemapMin || face > kSkyboxCubemapMax) {
return false;
}
out->face_size = face;
out->layer_count = kSkyboxFaceCount;
out->face_bytes =
static_cast<std::uint64_t>(face) * static_cast<std::uint64_t>(face) * 16u;
return true;
}
// Per-face, per-texel cubemap direction (shared CPU/GPU contract).
// face in [0, 6), x/y in [0, size). Out is a unit vector. Returns
// false on null out, bad face, or size 0 (out untouched).
[[nodiscard]] inline auto SkyboxFaceDir(std::uint32_t face, std::uint32_t x,
std::uint32_t y, std::uint32_t size,
float out[3]) noexcept -> bool {
if (out == nullptr || face >= kSkyboxFaceCount || size == 0) {
return false;
}
const float inv = 1.0F / static_cast<float>(size);
const float u =
(static_cast<float>(x) + 0.5F) * inv * 2.0F - 1.0F; // [-1, 1]
const float v =
(static_cast<float>(y) + 0.5F) * inv * 2.0F - 1.0F; // [-1, 1]
float dx = 0.0F;
float dy = 0.0F;
float dz = 0.0F;
switch (face) {
case 0: // +X
dx = 1.0F;
dy = -v;
dz = -u;
break;
case 1: // -X
dx = -1.0F;
dy = -v;
dz = u;
break;
case 2: // +Y
dx = u;
dy = 1.0F;
dz = v;
break;
case 3: // -Y
dx = u;
dy = -1.0F;
dz = -v;
break;
case 4: // +Z
dx = u;
dy = -v;
dz = 1.0F;
break;
default: // face 5: -Z
dx = -u;
dy = -v;
dz = -1.0F;
break;
}
const float len = std::sqrt(dx * dx + dy * dy + dz * dz);
if (len <= 0.0F) {
return false;
}
out[0] = dx / len;
out[1] = dy / len;
out[2] = dz / len;
return true;
}
// Direction -> equirect UV (u in [0,1) around, v in [0,1] down from
// zenith). Matches the compute shader's mapping term for term.
inline auto SkyboxDirToUv(float dx, float dy, float dz, float* u_out,
float* v_out) noexcept -> void {
// Longitude: atan2(x, z) so +Z (face 4 center) maps to u = 0.5.
constexpr float kPi = 3.141592653589793F;
float u = 0.5F + std::atan2(dx, dz) / (2.0F * kPi);
// Wrap: atan2 seam at u = 0/1.
u = u - std::floor(u);
float c = dy;
c = c < -1.0F ? -1.0F : (c > 1.0F ? 1.0F : c);
const float v = std::acos(c) / kPi;
if (u_out != nullptr) {
*u_out = u;
}
if (v_out != nullptr) {
*v_out = v;
}
}
// Bilinear sample of an RGBA float equirect buffer (row-major, w*h*4
// floats) at a unit direction. Out is rgb (alpha dropped). Null-safe:
// null pixels/out, w/h 0, or non-unit-free NaN direction -> false.
// Wrap in u, clamp in v (matches CLAMP_TO_EDGE sampler in v).
[[nodiscard]] inline auto SkyboxSampleEquirectCpu(const float* pixels,
std::uint32_t w,
std::uint32_t h,
const float dir[3],
float out[3]) noexcept
-> bool {
if (pixels == nullptr || out == nullptr || w == 0 || h == 0 ||
dir == nullptr) {
return false;
}
float u = 0.0F;
float v = 0.0F;
SkyboxDirToUv(dir[0], dir[1], dir[2], &u, &v);
const float fx = u * static_cast<float>(w) - 0.5F;
const float fy = v * static_cast<float>(h) - 0.5F;
int x0 = static_cast<int>(std::floor(fx));
int y0 = static_cast<int>(std::floor(fy));
const float tx = fx - static_cast<float>(x0);
const float ty = fy - static_cast<float>(y0);
// Horizontal wrap; vertical clamp.
auto wrap_x = [w](int x) -> std::uint32_t {
int m = x % static_cast<int>(w);
if (m < 0) {
m += static_cast<int>(w);
}
return static_cast<std::uint32_t>(m);
};
auto clamp_y = [h](int y) -> std::uint32_t {
if (y < 0) {
return 0;
}
if (y >= static_cast<int>(h)) {
return h - 1;
}
return static_cast<std::uint32_t>(y);
};
const std::uint32_t xa = wrap_x(x0);
const std::uint32_t xb = wrap_x(x0 + 1);
const std::uint32_t ya = clamp_y(y0);
const std::uint32_t yb = clamp_y(y0 + 1);
const std::array<std::uint64_t, 4> idx = {
(static_cast<std::uint64_t>(ya) * w + xa) * 4,
(static_cast<std::uint64_t>(ya) * w + xb) * 4,
(static_cast<std::uint64_t>(yb) * w + xa) * 4,
(static_cast<std::uint64_t>(yb) * w + xb) * 4,
};
for (int c = 0; c < 3; ++c) {
const std::uint32_t cc0 = static_cast<std::uint32_t>(c);
const float a = pixels[idx[0] + cc0];
const float b = pixels[idx[1] + cc0];
const float cc = pixels[idx[2] + cc0];
const float d = pixels[idx[3] + cc0];
const float top = a + (b - a) * tx;
const float bot = cc + (d - cc) * tx;
out[c] = top + (bot - top) * ty;
}
return true;
}
} // namespace engine::renderer
+12 -3
View File
@@ -9,15 +9,24 @@ compiled OFFLINE to SPIR-V and checked in as `cull_spv.inc` / `hiz_spv.inc`
deterministic bytes (byte-identical shaders on every OS), and zero file IO
on the frame path (`VkShaderModuleCreateInfo` reads the `.inc` arrays).
To regenerate after editing a `.comp` file:
To regenerate after editing a `.comp`/`.vert`/`.frag` file (P4-05 GLSL set:
`equirect_to_cube`, `irradiance`, `prefilter`, `brdf_lut`, `skybox_vert`,
`skybox_frag`, `ibl_shade_vert`, `ibl_shade_frag`):
glslangValidator -V --target-env vulkan1.3 -o /tmp/cull.spv cull.comp
python3 embed_spv.py /tmp/cull.spv cull_spv.inc (same for hiz)
glslangValidator -V --target-env vulkan1.3 -S comp -o /tmp/NAME.spv NAME.comp
python3 embed_spv.py /tmp/NAME.spv NAME_spv.inc (same for hiz)
then rebuild + run `engine_gpu_indirect`. glslang-tools 15.x
(libvulkan-dev era) is the reference compiler; newer glslang stays
compatible as long as `--target-env vulkan1.3` is kept.
Each blob exists in TWO checked-in copies that must be regenerated together:
`native/renderer/shaders/<name>_spv.inc` (source-side) and
`native/renderer/include/engine/renderer/shaders/<name>_spv.inc` (header
include path the tests compile against). Copy the regenerated `.inc` to
both locations (or run `embed_spv.py` once and copy the output), then
verify with `cmp` that both copies are byte-identical.
## M3-03 (Slang, modular PBR)
`pbr_common.slang` (shared BRDF: GGX + Schlick + Smith + ACES + sRGB),
+97
View File
@@ -0,0 +1,97 @@
// brdf_lut.comp — P4-05: split-sum BRDF LUT (Karis 2013) generation.
//
// One invocation per LUT texel: x = NdotV axis, y = roughness axis,
// texel centers (x+0.5)/size, (y+0.5)/size. Dispatch ((size+15)/16,
// (size+15)/16, 1) with ceil division so tail edges < 16 texels are covered.
// with local size 16x16. Writes R=scale, G=bias (RG32F storage image,
// binding 1); no input textures. Push constant: lut_size (edge).
//
// Integration mirrors BrdfIntegrate() in brdf_lut.hpp term for term:
// Hammersley(1024) + GGX importance sampling + Schlick-GGX Smith
// geometry + Schlick Fresnel split (scale = (1-Fc)*Gvis, bias = Fc*Gvis).
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into brdf_lut_spv.inc (both shader dirs).
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout(set = 0, binding = 1, rg32f) uniform writeonly image2D u_lut;
layout(push_constant, scalar) uniform LutPush {
uint lut_size; // LUT edge in texels (dispatch x/y cover it)
} g_push;
float radical_inverse_vdc(uint bits) {
uint reversed = bits;
reversed = ((reversed << 16) | (reversed >> 16));
reversed = (((reversed & 0x55555555u) << 1) | ((reversed & 0xAAAAAAAAu) >> 1));
reversed = (((reversed & 0x33333333u) << 2) | ((reversed & 0xCCCCCCCCu) >> 2));
reversed = (((reversed & 0x0F0F0F0Fu) << 4) | ((reversed & 0xF0F0F0F0u) >> 4));
reversed = (((reversed & 0x00FF00FFu) << 8) | ((reversed & 0xFF00FF00u) >> 8));
return float(reversed) * 2.3283064365386963e-10;
}
vec2 hammersley(uint i, uint n) {
return vec2(float(i) / float(n), radical_inverse_vdc(i));
}
vec3 importance_sample_ggx(vec2 xi, float roughness) {
float a = roughness * roughness;
float a2 = a * a;
float denom = 1.0 + (a2 - 1.0) * xi.y;
float cos_theta = denom > 1e-7 ? sqrt((1.0 - xi.y) / denom) : 1.0;
float phi = 6.283185307179586 * xi.x;
float sin_theta = sqrt(max(1.0 - cos_theta * cos_theta, 0.0));
return vec3(sin_theta * cos(phi), sin_theta * sin(phi), cos_theta);
}
float geometry_schlick_ggx(float n_dot_v, float roughness) {
float r = roughness + 1.0;
float k = (r * r) / 8.0;
float denom = n_dot_v * (1.0 - k) + k;
return denom > 1e-7 ? n_dot_v / denom : 0.0;
}
float geometry_smith(float n_dot_v, float n_dot_l, float roughness) {
return geometry_schlick_ggx(n_dot_v, roughness) *
geometry_schlick_ggx(n_dot_l, roughness);
}
vec2 integrate_brdf(float ndv, float roughness) {
vec3 v = vec3(ndv < 1.0 ? sqrt(max(1.0 - ndv * ndv, 0.0)) : 0.0, 0.0, max(ndv, 0.0));
float scale = 0.0;
float bias = 0.0;
const uint kSamples = 1024u;
for (uint i = 0; i < kSamples; ++i) {
vec2 xi = hammersley(i, kSamples);
vec3 h = importance_sample_ggx(xi, roughness);
vec3 l = normalize(2.0 * dot(v, h) * h - v);
float n_dot_l = max(l.z, 0.0);
if (n_dot_l > 0.0) {
float n_dot_h = max(h.z, 0.0);
float vdoth = max(dot(v, h), 0.0);
if (n_dot_h > 0.0 && vdoth > 0.0) {
float g = geometry_smith(ndv, n_dot_l, roughness);
float g_vis = (g * vdoth) / max(n_dot_h * ndv, 1e-7);
float fc = pow(1.0 - vdoth, 5.0);
scale += (1.0 - fc) * g_vis;
bias += fc * g_vis;
}
}
}
return vec2(scale, bias) / float(kSamples);
}
void main() {
uint x = gl_GlobalInvocationID.x;
uint y = gl_GlobalInvocationID.y;
if (x >= g_push.lut_size || y >= g_push.lut_size) {
return;
}
float ndv = (float(x) + 0.5) / float(g_push.lut_size);
float rough = (float(y) + 0.5) / float(g_push.lut_size);
vec2 lut = integrate_brdf(ndv, rough);
imageStore(u_lut, ivec2(int(x), int(y)), vec4(lut.x, lut.y, 0.0, 1.0));
}
+385
View File
@@ -0,0 +1,385 @@
// brdf_lut.spv — 2259 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -o brdf_lut.spv brdf_lut.comp
// then: python3 native/renderer/shaders/embed_spv.py brdf_lut.spv brdf_lut_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kBrdf_lutSpvWords = 2259u;
inline constexpr std::uint32_t kBrdf_lutSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x0000018fu, 0x00000000u, 0x00020011u,
0x00000001u, 0x00020011u, 0x00000031u, 0x0006000bu, 0x00000001u, 0x4c534c47u,
0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
0x0008000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000014bu,
0x00000155u, 0x0000017fu, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u,
0x00000010u, 0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u,
0x455f4c47u, 0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu,
0x00007475u, 0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u,
0x0000000bu, 0x69646172u, 0x5f6c6163u, 0x65766e69u, 0x5f657372u, 0x28636476u,
0x003b3175u, 0x00040005u, 0x0000000au, 0x73746962u, 0x00000000u, 0x00070005u,
0x00000011u, 0x6d6d6168u, 0x6c737265u, 0x75287965u, 0x31753b31u, 0x0000003bu,
0x00030005u, 0x0000000fu, 0x00000069u, 0x00030005u, 0x00000010u, 0x0000006eu,
0x000a0005u, 0x00000019u, 0x6f706d69u, 0x6e617472u, 0x735f6563u, 0x6c706d61u,
0x67675f65u, 0x66762878u, 0x31663b32u, 0x0000003bu, 0x00030005u, 0x00000017u,
0x00006978u, 0x00050005u, 0x00000018u, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00090005u, 0x0000001eu, 0x6d6f6567u, 0x79727465u, 0x6863735fu, 0x6b63696cu,
0x7867675fu, 0x3b316628u, 0x003b3166u, 0x00040005u, 0x0000001cu, 0x6f645f6eu,
0x00765f74u, 0x00050005u, 0x0000001du, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00090005u, 0x00000024u, 0x6d6f6567u, 0x79727465u, 0x696d735fu, 0x66286874u,
0x31663b31u, 0x3b31663bu, 0x00000000u, 0x00040005u, 0x00000021u, 0x6f645f6eu,
0x00765f74u, 0x00040005u, 0x00000022u, 0x6f645f6eu, 0x006c5f74u, 0x00050005u,
0x00000023u, 0x67756f72u, 0x73656e68u, 0x00000073u, 0x00080005u, 0x00000029u,
0x65746e69u, 0x74617267u, 0x72625f65u, 0x66286664u, 0x31663b31u, 0x0000003bu,
0x00030005u, 0x00000027u, 0x0076646eu, 0x00050005u, 0x00000028u, 0x67756f72u,
0x73656e68u, 0x00000073u, 0x00050005u, 0x0000002bu, 0x65766572u, 0x64657372u,
0x00000000u, 0x00040005u, 0x00000067u, 0x61726170u, 0x0000006du, 0x00030005u,
0x0000006du, 0x00000061u, 0x00030005u, 0x00000071u, 0x00003261u, 0x00040005u,
0x00000075u, 0x6f6e6564u, 0x0000006du, 0x00050005u, 0x0000007eu, 0x5f736f63u,
0x74656874u, 0x00000061u, 0x00030005u, 0x0000008eu, 0x00696870u, 0x00050005u,
0x00000094u, 0x5f6e6973u, 0x74656874u, 0x00000061u, 0x00030005u, 0x000000a8u,
0x00000072u, 0x00030005u, 0x000000abu, 0x0000006bu, 0x00040005u, 0x000000b1u,
0x6f6e6564u, 0x0000006du, 0x00040005u, 0x000000c4u, 0x61726170u, 0x0000006du,
0x00040005u, 0x000000c6u, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000c9u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000cbu, 0x61726170u, 0x0000006du,
0x00030005u, 0x000000d2u, 0x00000076u, 0x00040005u, 0x000000e3u, 0x6c616373u,
0x00000065u, 0x00040005u, 0x000000e4u, 0x73616962u, 0x00000000u, 0x00030005u,
0x000000e5u, 0x00000069u, 0x00030005u, 0x000000eeu, 0x00006978u, 0x00040005u,
0x000000efu, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000f1u, 0x61726170u,
0x0000006du, 0x00030005u, 0x000000f3u, 0x00000068u, 0x00040005u, 0x000000f4u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000f6u, 0x61726170u, 0x0000006du,
0x00030005u, 0x000000f9u, 0x0000006cu, 0x00040005u, 0x00000104u, 0x6f645f6eu,
0x006c5f74u, 0x00040005u, 0x0000010du, 0x6f645f6eu, 0x00685f74u, 0x00040005u,
0x00000111u, 0x746f6476u, 0x00000068u, 0x00030005u, 0x0000011du, 0x00000067u,
0x00040005u, 0x0000011eu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000120u,
0x61726170u, 0x0000006du, 0x00040005u, 0x00000122u, 0x61726170u, 0x0000006du,
0x00040005u, 0x00000125u, 0x69765f67u, 0x00000073u, 0x00030005u, 0x0000012eu,
0x00006366u, 0x00030005u, 0x00000148u, 0x00000078u, 0x00080005u, 0x0000014bu,
0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u,
0x00030005u, 0x0000014fu, 0x00000079u, 0x00040005u, 0x00000153u, 0x5074754cu,
0x00687375u, 0x00060006u, 0x00000153u, 0x00000000u, 0x5f74756cu, 0x657a6973u,
0x00000000u, 0x00040005u, 0x00000155u, 0x75705f67u, 0x00006873u, 0x00030005u,
0x00000166u, 0x0076646eu, 0x00040005u, 0x0000016fu, 0x67756f72u, 0x00000068u,
0x00030005u, 0x00000177u, 0x0074756cu, 0x00040005u, 0x00000178u, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000017au, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000017fu, 0x756c5f75u, 0x00000074u, 0x00040047u, 0x0000014bu, 0x0000000bu,
0x0000001cu, 0x00030047u, 0x00000153u, 0x00000002u, 0x00050048u, 0x00000153u,
0x00000000u, 0x00000023u, 0x00000000u, 0x00030047u, 0x0000017fu, 0x00000019u,
0x00040047u, 0x0000017fu, 0x00000021u, 0x00000001u, 0x00040047u, 0x0000017fu,
0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u,
0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u,
0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u, 0x00000008u, 0x00000020u,
0x00040021u, 0x00000009u, 0x00000008u, 0x00000007u, 0x00040017u, 0x0000000du,
0x00000008u, 0x00000002u, 0x00050021u, 0x0000000eu, 0x0000000du, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000013u, 0x00000007u, 0x0000000du, 0x00040020u,
0x00000014u, 0x00000007u, 0x00000008u, 0x00040017u, 0x00000015u, 0x00000008u,
0x00000003u, 0x00050021u, 0x00000016u, 0x00000015u, 0x00000013u, 0x00000014u,
0x00050021u, 0x0000001bu, 0x00000008u, 0x00000014u, 0x00000014u, 0x00060021u,
0x00000020u, 0x00000008u, 0x00000014u, 0x00000014u, 0x00000014u, 0x00050021u,
0x00000026u, 0x0000000du, 0x00000014u, 0x00000014u, 0x00040015u, 0x0000002eu,
0x00000020u, 0x00000001u, 0x0004002bu, 0x0000002eu, 0x0000002fu, 0x00000010u,
0x0004002bu, 0x00000006u, 0x00000035u, 0x55555555u, 0x0004002bu, 0x0000002eu,
0x00000037u, 0x00000001u, 0x0004002bu, 0x00000006u, 0x0000003au, 0xaaaaaaaau,
0x0004002bu, 0x00000006u, 0x0000003fu, 0x33333333u, 0x0004002bu, 0x0000002eu,
0x00000041u, 0x00000002u, 0x0004002bu, 0x00000006u, 0x00000044u, 0xccccccccu,
0x0004002bu, 0x00000006u, 0x00000049u, 0x0f0f0f0fu, 0x0004002bu, 0x0000002eu,
0x0000004bu, 0x00000004u, 0x0004002bu, 0x00000006u, 0x0000004eu, 0xf0f0f0f0u,
0x0004002bu, 0x00000006u, 0x00000053u, 0x00ff00ffu, 0x0004002bu, 0x0000002eu,
0x00000055u, 0x00000008u, 0x0004002bu, 0x00000006u, 0x00000058u, 0xff00ff00u,
0x0004002bu, 0x00000008u, 0x0000005eu, 0x2f800000u, 0x0004002bu, 0x00000008u,
0x00000076u, 0x3f800000u, 0x0004002bu, 0x00000006u, 0x00000079u, 0x00000001u,
0x0004002bu, 0x00000008u, 0x00000080u, 0x33d6bf95u, 0x00020014u, 0x00000081u,
0x0004002bu, 0x00000008u, 0x0000008fu, 0x40c90fdbu, 0x0004002bu, 0x00000006u,
0x00000090u, 0x00000000u, 0x0004002bu, 0x00000008u, 0x00000099u, 0x00000000u,
0x0004002bu, 0x00000008u, 0x000000afu, 0x41000000u, 0x00040020u, 0x000000d1u,
0x00000007u, 0x00000015u, 0x0004002bu, 0x00000006u, 0x000000ecu, 0x00000400u,
0x0004002bu, 0x00000008u, 0x000000fau, 0x40000000u, 0x0004002bu, 0x00000006u,
0x00000105u, 0x00000002u, 0x0004002bu, 0x00000008u, 0x00000131u, 0x40a00000u,
0x0004002bu, 0x00000008u, 0x00000143u, 0x44800000u, 0x00040017u, 0x00000149u,
0x00000006u, 0x00000003u, 0x00040020u, 0x0000014au, 0x00000001u, 0x00000149u,
0x0004003bu, 0x0000014au, 0x0000014bu, 0x00000001u, 0x00040020u, 0x0000014cu,
0x00000001u, 0x00000006u, 0x0003001eu, 0x00000153u, 0x00000006u, 0x00040020u,
0x00000154u, 0x00000009u, 0x00000153u, 0x0004003bu, 0x00000154u, 0x00000155u,
0x00000009u, 0x0004002bu, 0x0000002eu, 0x00000156u, 0x00000000u, 0x00040020u,
0x00000157u, 0x00000009u, 0x00000006u, 0x0004002bu, 0x00000008u, 0x00000169u,
0x3f000000u, 0x00090019u, 0x0000017du, 0x00000008u, 0x00000001u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000002u, 0x00000006u, 0x00040020u, 0x0000017eu,
0x00000000u, 0x0000017du, 0x0004003bu, 0x0000017eu, 0x0000017fu, 0x00000000u,
0x00040017u, 0x00000185u, 0x0000002eu, 0x00000002u, 0x00040017u, 0x0000018bu,
0x00000008u, 0x00000004u, 0x0004002bu, 0x00000006u, 0x0000018du, 0x00000010u,
0x0006002cu, 0x00000149u, 0x0000018eu, 0x0000018du, 0x0000018du, 0x00000079u,
0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u,
0x00000005u, 0x0004003bu, 0x00000007u, 0x00000148u, 0x00000007u, 0x0004003bu,
0x00000007u, 0x0000014fu, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000166u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x0000016fu, 0x00000007u, 0x0004003bu,
0x00000013u, 0x00000177u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000178u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x0000017au, 0x00000007u, 0x00050041u,
0x0000014cu, 0x0000014du, 0x0000014bu, 0x00000090u, 0x0004003du, 0x00000006u,
0x0000014eu, 0x0000014du, 0x0003003eu, 0x00000148u, 0x0000014eu, 0x00050041u,
0x0000014cu, 0x00000150u, 0x0000014bu, 0x00000079u, 0x0004003du, 0x00000006u,
0x00000151u, 0x00000150u, 0x0003003eu, 0x0000014fu, 0x00000151u, 0x0004003du,
0x00000006u, 0x00000152u, 0x00000148u, 0x00050041u, 0x00000157u, 0x00000158u,
0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000159u, 0x00000158u,
0x000500aeu, 0x00000081u, 0x0000015au, 0x00000152u, 0x00000159u, 0x000400a8u,
0x00000081u, 0x0000015bu, 0x0000015au, 0x000300f7u, 0x0000015du, 0x00000000u,
0x000400fau, 0x0000015bu, 0x0000015cu, 0x0000015du, 0x000200f8u, 0x0000015cu,
0x0004003du, 0x00000006u, 0x0000015eu, 0x0000014fu, 0x00050041u, 0x00000157u,
0x0000015fu, 0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000160u,
0x0000015fu, 0x000500aeu, 0x00000081u, 0x00000161u, 0x0000015eu, 0x00000160u,
0x000200f9u, 0x0000015du, 0x000200f8u, 0x0000015du, 0x000700f5u, 0x00000081u,
0x00000162u, 0x0000015au, 0x00000005u, 0x00000161u, 0x0000015cu, 0x000300f7u,
0x00000164u, 0x00000000u, 0x000400fau, 0x00000162u, 0x00000163u, 0x00000164u,
0x000200f8u, 0x00000163u, 0x000100fdu, 0x000200f8u, 0x00000164u, 0x0004003du,
0x00000006u, 0x00000167u, 0x00000148u, 0x00040070u, 0x00000008u, 0x00000168u,
0x00000167u, 0x00050081u, 0x00000008u, 0x0000016au, 0x00000168u, 0x00000169u,
0x00050041u, 0x00000157u, 0x0000016bu, 0x00000155u, 0x00000156u, 0x0004003du,
0x00000006u, 0x0000016cu, 0x0000016bu, 0x00040070u, 0x00000008u, 0x0000016du,
0x0000016cu, 0x00050088u, 0x00000008u, 0x0000016eu, 0x0000016au, 0x0000016du,
0x0003003eu, 0x00000166u, 0x0000016eu, 0x0004003du, 0x00000006u, 0x00000170u,
0x0000014fu, 0x00040070u, 0x00000008u, 0x00000171u, 0x00000170u, 0x00050081u,
0x00000008u, 0x00000172u, 0x00000171u, 0x00000169u, 0x00050041u, 0x00000157u,
0x00000173u, 0x00000155u, 0x00000156u, 0x0004003du, 0x00000006u, 0x00000174u,
0x00000173u, 0x00040070u, 0x00000008u, 0x00000175u, 0x00000174u, 0x00050088u,
0x00000008u, 0x00000176u, 0x00000172u, 0x00000175u, 0x0003003eu, 0x0000016fu,
0x00000176u, 0x0004003du, 0x00000008u, 0x00000179u, 0x00000166u, 0x0003003eu,
0x00000178u, 0x00000179u, 0x0004003du, 0x00000008u, 0x0000017bu, 0x0000016fu,
0x0003003eu, 0x0000017au, 0x0000017bu, 0x00060039u, 0x0000000du, 0x0000017cu,
0x00000029u, 0x00000178u, 0x0000017au, 0x0003003eu, 0x00000177u, 0x0000017cu,
0x0004003du, 0x0000017du, 0x00000180u, 0x0000017fu, 0x0004003du, 0x00000006u,
0x00000181u, 0x00000148u, 0x0004007cu, 0x0000002eu, 0x00000182u, 0x00000181u,
0x0004003du, 0x00000006u, 0x00000183u, 0x0000014fu, 0x0004007cu, 0x0000002eu,
0x00000184u, 0x00000183u, 0x00050050u, 0x00000185u, 0x00000186u, 0x00000182u,
0x00000184u, 0x00050041u, 0x00000014u, 0x00000187u, 0x00000177u, 0x00000090u,
0x0004003du, 0x00000008u, 0x00000188u, 0x00000187u, 0x00050041u, 0x00000014u,
0x00000189u, 0x00000177u, 0x00000079u, 0x0004003du, 0x00000008u, 0x0000018au,
0x00000189u, 0x00070050u, 0x0000018bu, 0x0000018cu, 0x00000188u, 0x0000018au,
0x00000099u, 0x00000076u, 0x00040063u, 0x00000180u, 0x00000186u, 0x0000018cu,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000008u, 0x0000000bu, 0x00000000u,
0x00000009u, 0x00030037u, 0x00000007u, 0x0000000au, 0x000200f8u, 0x0000000cu,
0x0004003bu, 0x00000007u, 0x0000002bu, 0x00000007u, 0x0004003du, 0x00000006u,
0x0000002cu, 0x0000000au, 0x0003003eu, 0x0000002bu, 0x0000002cu, 0x0004003du,
0x00000006u, 0x0000002du, 0x0000002bu, 0x000500c4u, 0x00000006u, 0x00000030u,
0x0000002du, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000031u, 0x0000002bu,
0x000500c2u, 0x00000006u, 0x00000032u, 0x00000031u, 0x0000002fu, 0x000500c5u,
0x00000006u, 0x00000033u, 0x00000030u, 0x00000032u, 0x0003003eu, 0x0000002bu,
0x00000033u, 0x0004003du, 0x00000006u, 0x00000034u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000036u, 0x00000034u, 0x00000035u, 0x000500c4u, 0x00000006u,
0x00000038u, 0x00000036u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000039u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x0000003bu, 0x00000039u, 0x0000003au,
0x000500c2u, 0x00000006u, 0x0000003cu, 0x0000003bu, 0x00000037u, 0x000500c5u,
0x00000006u, 0x0000003du, 0x00000038u, 0x0000003cu, 0x0003003eu, 0x0000002bu,
0x0000003du, 0x0004003du, 0x00000006u, 0x0000003eu, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000040u, 0x0000003eu, 0x0000003fu, 0x000500c4u, 0x00000006u,
0x00000042u, 0x00000040u, 0x00000041u, 0x0004003du, 0x00000006u, 0x00000043u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x00000045u, 0x00000043u, 0x00000044u,
0x000500c2u, 0x00000006u, 0x00000046u, 0x00000045u, 0x00000041u, 0x000500c5u,
0x00000006u, 0x00000047u, 0x00000042u, 0x00000046u, 0x0003003eu, 0x0000002bu,
0x00000047u, 0x0004003du, 0x00000006u, 0x00000048u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x0000004au, 0x00000048u, 0x00000049u, 0x000500c4u, 0x00000006u,
0x0000004cu, 0x0000004au, 0x0000004bu, 0x0004003du, 0x00000006u, 0x0000004du,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x0000004fu, 0x0000004du, 0x0000004eu,
0x000500c2u, 0x00000006u, 0x00000050u, 0x0000004fu, 0x0000004bu, 0x000500c5u,
0x00000006u, 0x00000051u, 0x0000004cu, 0x00000050u, 0x0003003eu, 0x0000002bu,
0x00000051u, 0x0004003du, 0x00000006u, 0x00000052u, 0x0000002bu, 0x000500c7u,
0x00000006u, 0x00000054u, 0x00000052u, 0x00000053u, 0x000500c4u, 0x00000006u,
0x00000056u, 0x00000054u, 0x00000055u, 0x0004003du, 0x00000006u, 0x00000057u,
0x0000002bu, 0x000500c7u, 0x00000006u, 0x00000059u, 0x00000057u, 0x00000058u,
0x000500c2u, 0x00000006u, 0x0000005au, 0x00000059u, 0x00000055u, 0x000500c5u,
0x00000006u, 0x0000005bu, 0x00000056u, 0x0000005au, 0x0003003eu, 0x0000002bu,
0x0000005bu, 0x0004003du, 0x00000006u, 0x0000005cu, 0x0000002bu, 0x00040070u,
0x00000008u, 0x0000005du, 0x0000005cu, 0x00050085u, 0x00000008u, 0x0000005fu,
0x0000005du, 0x0000005eu, 0x000200feu, 0x0000005fu, 0x00010038u, 0x00050036u,
0x0000000du, 0x00000011u, 0x00000000u, 0x0000000eu, 0x00030037u, 0x00000007u,
0x0000000fu, 0x00030037u, 0x00000007u, 0x00000010u, 0x000200f8u, 0x00000012u,
0x0004003bu, 0x00000007u, 0x00000067u, 0x00000007u, 0x0004003du, 0x00000006u,
0x00000062u, 0x0000000fu, 0x00040070u, 0x00000008u, 0x00000063u, 0x00000062u,
0x0004003du, 0x00000006u, 0x00000064u, 0x00000010u, 0x00040070u, 0x00000008u,
0x00000065u, 0x00000064u, 0x00050088u, 0x00000008u, 0x00000066u, 0x00000063u,
0x00000065u, 0x0004003du, 0x00000006u, 0x00000068u, 0x0000000fu, 0x0003003eu,
0x00000067u, 0x00000068u, 0x00050039u, 0x00000008u, 0x00000069u, 0x0000000bu,
0x00000067u, 0x00050050u, 0x0000000du, 0x0000006au, 0x00000066u, 0x00000069u,
0x000200feu, 0x0000006au, 0x00010038u, 0x00050036u, 0x00000015u, 0x00000019u,
0x00000000u, 0x00000016u, 0x00030037u, 0x00000013u, 0x00000017u, 0x00030037u,
0x00000014u, 0x00000018u, 0x000200f8u, 0x0000001au, 0x0004003bu, 0x00000014u,
0x0000006du, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000071u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000075u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x0000007eu, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000083u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x0000008eu, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000094u, 0x00000007u, 0x0004003du, 0x00000008u, 0x0000006eu, 0x00000018u,
0x0004003du, 0x00000008u, 0x0000006fu, 0x00000018u, 0x00050085u, 0x00000008u,
0x00000070u, 0x0000006eu, 0x0000006fu, 0x0003003eu, 0x0000006du, 0x00000070u,
0x0004003du, 0x00000008u, 0x00000072u, 0x0000006du, 0x0004003du, 0x00000008u,
0x00000073u, 0x0000006du, 0x00050085u, 0x00000008u, 0x00000074u, 0x00000072u,
0x00000073u, 0x0003003eu, 0x00000071u, 0x00000074u, 0x0004003du, 0x00000008u,
0x00000077u, 0x00000071u, 0x00050083u, 0x00000008u, 0x00000078u, 0x00000077u,
0x00000076u, 0x00050041u, 0x00000014u, 0x0000007au, 0x00000017u, 0x00000079u,
0x0004003du, 0x00000008u, 0x0000007bu, 0x0000007au, 0x00050085u, 0x00000008u,
0x0000007cu, 0x00000078u, 0x0000007bu, 0x00050081u, 0x00000008u, 0x0000007du,
0x00000076u, 0x0000007cu, 0x0003003eu, 0x00000075u, 0x0000007du, 0x0004003du,
0x00000008u, 0x0000007fu, 0x00000075u, 0x000500bau, 0x00000081u, 0x00000082u,
0x0000007fu, 0x00000080u, 0x000300f7u, 0x00000085u, 0x00000000u, 0x000400fau,
0x00000082u, 0x00000084u, 0x0000008cu, 0x000200f8u, 0x00000084u, 0x00050041u,
0x00000014u, 0x00000086u, 0x00000017u, 0x00000079u, 0x0004003du, 0x00000008u,
0x00000087u, 0x00000086u, 0x00050083u, 0x00000008u, 0x00000088u, 0x00000076u,
0x00000087u, 0x0004003du, 0x00000008u, 0x00000089u, 0x00000075u, 0x00050088u,
0x00000008u, 0x0000008au, 0x00000088u, 0x00000089u, 0x0006000cu, 0x00000008u,
0x0000008bu, 0x00000001u, 0x0000001fu, 0x0000008au, 0x0003003eu, 0x00000083u,
0x0000008bu, 0x000200f9u, 0x00000085u, 0x000200f8u, 0x0000008cu, 0x0003003eu,
0x00000083u, 0x00000076u, 0x000200f9u, 0x00000085u, 0x000200f8u, 0x00000085u,
0x0004003du, 0x00000008u, 0x0000008du, 0x00000083u, 0x0003003eu, 0x0000007eu,
0x0000008du, 0x00050041u, 0x00000014u, 0x00000091u, 0x00000017u, 0x00000090u,
0x0004003du, 0x00000008u, 0x00000092u, 0x00000091u, 0x00050085u, 0x00000008u,
0x00000093u, 0x0000008fu, 0x00000092u, 0x0003003eu, 0x0000008eu, 0x00000093u,
0x0004003du, 0x00000008u, 0x00000095u, 0x0000007eu, 0x0004003du, 0x00000008u,
0x00000096u, 0x0000007eu, 0x00050085u, 0x00000008u, 0x00000097u, 0x00000095u,
0x00000096u, 0x00050083u, 0x00000008u, 0x00000098u, 0x00000076u, 0x00000097u,
0x0007000cu, 0x00000008u, 0x0000009au, 0x00000001u, 0x00000028u, 0x00000098u,
0x00000099u, 0x0006000cu, 0x00000008u, 0x0000009bu, 0x00000001u, 0x0000001fu,
0x0000009au, 0x0003003eu, 0x00000094u, 0x0000009bu, 0x0004003du, 0x00000008u,
0x0000009cu, 0x00000094u, 0x0004003du, 0x00000008u, 0x0000009du, 0x0000008eu,
0x0006000cu, 0x00000008u, 0x0000009eu, 0x00000001u, 0x0000000eu, 0x0000009du,
0x00050085u, 0x00000008u, 0x0000009fu, 0x0000009cu, 0x0000009eu, 0x0004003du,
0x00000008u, 0x000000a0u, 0x00000094u, 0x0004003du, 0x00000008u, 0x000000a1u,
0x0000008eu, 0x0006000cu, 0x00000008u, 0x000000a2u, 0x00000001u, 0x0000000du,
0x000000a1u, 0x00050085u, 0x00000008u, 0x000000a3u, 0x000000a0u, 0x000000a2u,
0x0004003du, 0x00000008u, 0x000000a4u, 0x0000007eu, 0x00060050u, 0x00000015u,
0x000000a5u, 0x0000009fu, 0x000000a3u, 0x000000a4u, 0x000200feu, 0x000000a5u,
0x00010038u, 0x00050036u, 0x00000008u, 0x0000001eu, 0x00000000u, 0x0000001bu,
0x00030037u, 0x00000014u, 0x0000001cu, 0x00030037u, 0x00000014u, 0x0000001du,
0x000200f8u, 0x0000001fu, 0x0004003bu, 0x00000014u, 0x000000a8u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x000000abu, 0x00000007u, 0x0004003bu, 0x00000014u,
0x000000b1u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000bau, 0x00000007u,
0x0004003du, 0x00000008u, 0x000000a9u, 0x0000001du, 0x00050081u, 0x00000008u,
0x000000aau, 0x000000a9u, 0x00000076u, 0x0003003eu, 0x000000a8u, 0x000000aau,
0x0004003du, 0x00000008u, 0x000000acu, 0x000000a8u, 0x0004003du, 0x00000008u,
0x000000adu, 0x000000a8u, 0x00050085u, 0x00000008u, 0x000000aeu, 0x000000acu,
0x000000adu, 0x00050088u, 0x00000008u, 0x000000b0u, 0x000000aeu, 0x000000afu,
0x0003003eu, 0x000000abu, 0x000000b0u, 0x0004003du, 0x00000008u, 0x000000b2u,
0x0000001cu, 0x0004003du, 0x00000008u, 0x000000b3u, 0x000000abu, 0x00050083u,
0x00000008u, 0x000000b4u, 0x00000076u, 0x000000b3u, 0x00050085u, 0x00000008u,
0x000000b5u, 0x000000b2u, 0x000000b4u, 0x0004003du, 0x00000008u, 0x000000b6u,
0x000000abu, 0x00050081u, 0x00000008u, 0x000000b7u, 0x000000b5u, 0x000000b6u,
0x0003003eu, 0x000000b1u, 0x000000b7u, 0x0004003du, 0x00000008u, 0x000000b8u,
0x000000b1u, 0x000500bau, 0x00000081u, 0x000000b9u, 0x000000b8u, 0x00000080u,
0x000300f7u, 0x000000bcu, 0x00000000u, 0x000400fau, 0x000000b9u, 0x000000bbu,
0x000000c0u, 0x000200f8u, 0x000000bbu, 0x0004003du, 0x00000008u, 0x000000bdu,
0x0000001cu, 0x0004003du, 0x00000008u, 0x000000beu, 0x000000b1u, 0x00050088u,
0x00000008u, 0x000000bfu, 0x000000bdu, 0x000000beu, 0x0003003eu, 0x000000bau,
0x000000bfu, 0x000200f9u, 0x000000bcu, 0x000200f8u, 0x000000c0u, 0x0003003eu,
0x000000bau, 0x00000099u, 0x000200f9u, 0x000000bcu, 0x000200f8u, 0x000000bcu,
0x0004003du, 0x00000008u, 0x000000c1u, 0x000000bau, 0x000200feu, 0x000000c1u,
0x00010038u, 0x00050036u, 0x00000008u, 0x00000024u, 0x00000000u, 0x00000020u,
0x00030037u, 0x00000014u, 0x00000021u, 0x00030037u, 0x00000014u, 0x00000022u,
0x00030037u, 0x00000014u, 0x00000023u, 0x000200f8u, 0x00000025u, 0x0004003bu,
0x00000014u, 0x000000c4u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000c6u,
0x00000007u, 0x0004003bu, 0x00000014u, 0x000000c9u, 0x00000007u, 0x0004003bu,
0x00000014u, 0x000000cbu, 0x00000007u, 0x0004003du, 0x00000008u, 0x000000c5u,
0x00000021u, 0x0003003eu, 0x000000c4u, 0x000000c5u, 0x0004003du, 0x00000008u,
0x000000c7u, 0x00000023u, 0x0003003eu, 0x000000c6u, 0x000000c7u, 0x00060039u,
0x00000008u, 0x000000c8u, 0x0000001eu, 0x000000c4u, 0x000000c6u, 0x0004003du,
0x00000008u, 0x000000cau, 0x00000022u, 0x0003003eu, 0x000000c9u, 0x000000cau,
0x0004003du, 0x00000008u, 0x000000ccu, 0x00000023u, 0x0003003eu, 0x000000cbu,
0x000000ccu, 0x00060039u, 0x00000008u, 0x000000cdu, 0x0000001eu, 0x000000c9u,
0x000000cbu, 0x00050085u, 0x00000008u, 0x000000ceu, 0x000000c8u, 0x000000cdu,
0x000200feu, 0x000000ceu, 0x00010038u, 0x00050036u, 0x0000000du, 0x00000029u,
0x00000000u, 0x00000026u, 0x00030037u, 0x00000014u, 0x00000027u, 0x00030037u,
0x00000014u, 0x00000028u, 0x000200f8u, 0x0000002au, 0x0004003bu, 0x000000d1u,
0x000000d2u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000d5u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x000000e3u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x000000e4u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000e5u, 0x00000007u,
0x0004003bu, 0x00000013u, 0x000000eeu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000efu, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000f1u, 0x00000007u,
0x0004003bu, 0x000000d1u, 0x000000f3u, 0x00000007u, 0x0004003bu, 0x00000013u,
0x000000f4u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x000000f6u, 0x00000007u,
0x0004003bu, 0x000000d1u, 0x000000f9u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000104u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x0000010du, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000111u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x0000011du, 0x00000007u, 0x0004003bu, 0x00000014u, 0x0000011eu, 0x00000007u,
0x0004003bu, 0x00000014u, 0x00000120u, 0x00000007u, 0x0004003bu, 0x00000014u,
0x00000122u, 0x00000007u, 0x0004003bu, 0x00000014u, 0x00000125u, 0x00000007u,
0x0004003bu, 0x00000014u, 0x0000012eu, 0x00000007u, 0x0004003du, 0x00000008u,
0x000000d3u, 0x00000027u, 0x000500b8u, 0x00000081u, 0x000000d4u, 0x000000d3u,
0x00000076u, 0x000300f7u, 0x000000d7u, 0x00000000u, 0x000400fau, 0x000000d4u,
0x000000d6u, 0x000000deu, 0x000200f8u, 0x000000d6u, 0x0004003du, 0x00000008u,
0x000000d8u, 0x00000027u, 0x0004003du, 0x00000008u, 0x000000d9u, 0x00000027u,
0x00050085u, 0x00000008u, 0x000000dau, 0x000000d8u, 0x000000d9u, 0x00050083u,
0x00000008u, 0x000000dbu, 0x00000076u, 0x000000dau, 0x0007000cu, 0x00000008u,
0x000000dcu, 0x00000001u, 0x00000028u, 0x000000dbu, 0x00000099u, 0x0006000cu,
0x00000008u, 0x000000ddu, 0x00000001u, 0x0000001fu, 0x000000dcu, 0x0003003eu,
0x000000d5u, 0x000000ddu, 0x000200f9u, 0x000000d7u, 0x000200f8u, 0x000000deu,
0x0003003eu, 0x000000d5u, 0x00000099u, 0x000200f9u, 0x000000d7u, 0x000200f8u,
0x000000d7u, 0x0004003du, 0x00000008u, 0x000000dfu, 0x000000d5u, 0x0004003du,
0x00000008u, 0x000000e0u, 0x00000027u, 0x0007000cu, 0x00000008u, 0x000000e1u,
0x00000001u, 0x00000028u, 0x000000e0u, 0x00000099u, 0x00060050u, 0x00000015u,
0x000000e2u, 0x000000dfu, 0x00000099u, 0x000000e1u, 0x0003003eu, 0x000000d2u,
0x000000e2u, 0x0003003eu, 0x000000e3u, 0x00000099u, 0x0003003eu, 0x000000e4u,
0x00000099u, 0x0003003eu, 0x000000e5u, 0x00000090u, 0x000200f9u, 0x000000e6u,
0x000200f8u, 0x000000e6u, 0x000400f6u, 0x000000e8u, 0x000000e9u, 0x00000000u,
0x000200f9u, 0x000000eau, 0x000200f8u, 0x000000eau, 0x0004003du, 0x00000006u,
0x000000ebu, 0x000000e5u, 0x000500b0u, 0x00000081u, 0x000000edu, 0x000000ebu,
0x000000ecu, 0x000400fau, 0x000000edu, 0x000000e7u, 0x000000e8u, 0x000200f8u,
0x000000e7u, 0x0004003du, 0x00000006u, 0x000000f0u, 0x000000e5u, 0x0003003eu,
0x000000efu, 0x000000f0u, 0x0003003eu, 0x000000f1u, 0x000000ecu, 0x00060039u,
0x0000000du, 0x000000f2u, 0x00000011u, 0x000000efu, 0x000000f1u, 0x0003003eu,
0x000000eeu, 0x000000f2u, 0x0004003du, 0x0000000du, 0x000000f5u, 0x000000eeu,
0x0003003eu, 0x000000f4u, 0x000000f5u, 0x0004003du, 0x00000008u, 0x000000f7u,
0x00000028u, 0x0003003eu, 0x000000f6u, 0x000000f7u, 0x00060039u, 0x00000015u,
0x000000f8u, 0x00000019u, 0x000000f4u, 0x000000f6u, 0x0003003eu, 0x000000f3u,
0x000000f8u, 0x0004003du, 0x00000015u, 0x000000fbu, 0x000000d2u, 0x0004003du,
0x00000015u, 0x000000fcu, 0x000000f3u, 0x00050094u, 0x00000008u, 0x000000fdu,
0x000000fbu, 0x000000fcu, 0x00050085u, 0x00000008u, 0x000000feu, 0x000000fau,
0x000000fdu, 0x0004003du, 0x00000015u, 0x000000ffu, 0x000000f3u, 0x0005008eu,
0x00000015u, 0x00000100u, 0x000000ffu, 0x000000feu, 0x0004003du, 0x00000015u,
0x00000101u, 0x000000d2u, 0x00050083u, 0x00000015u, 0x00000102u, 0x00000100u,
0x00000101u, 0x0006000cu, 0x00000015u, 0x00000103u, 0x00000001u, 0x00000045u,
0x00000102u, 0x0003003eu, 0x000000f9u, 0x00000103u, 0x00050041u, 0x00000014u,
0x00000106u, 0x000000f9u, 0x00000105u, 0x0004003du, 0x00000008u, 0x00000107u,
0x00000106u, 0x0007000cu, 0x00000008u, 0x00000108u, 0x00000001u, 0x00000028u,
0x00000107u, 0x00000099u, 0x0003003eu, 0x00000104u, 0x00000108u, 0x0004003du,
0x00000008u, 0x00000109u, 0x00000104u, 0x000500bau, 0x00000081u, 0x0000010au,
0x00000109u, 0x00000099u, 0x000300f7u, 0x0000010cu, 0x00000000u, 0x000400fau,
0x0000010au, 0x0000010bu, 0x0000010cu, 0x000200f8u, 0x0000010bu, 0x00050041u,
0x00000014u, 0x0000010eu, 0x000000f3u, 0x00000105u, 0x0004003du, 0x00000008u,
0x0000010fu, 0x0000010eu, 0x0007000cu, 0x00000008u, 0x00000110u, 0x00000001u,
0x00000028u, 0x0000010fu, 0x00000099u, 0x0003003eu, 0x0000010du, 0x00000110u,
0x0004003du, 0x00000015u, 0x00000112u, 0x000000d2u, 0x0004003du, 0x00000015u,
0x00000113u, 0x000000f3u, 0x00050094u, 0x00000008u, 0x00000114u, 0x00000112u,
0x00000113u, 0x0007000cu, 0x00000008u, 0x00000115u, 0x00000001u, 0x00000028u,
0x00000114u, 0x00000099u, 0x0003003eu, 0x00000111u, 0x00000115u, 0x0004003du,
0x00000008u, 0x00000116u, 0x0000010du, 0x000500bau, 0x00000081u, 0x00000117u,
0x00000116u, 0x00000099u, 0x0004003du, 0x00000008u, 0x00000118u, 0x00000111u,
0x000500bau, 0x00000081u, 0x00000119u, 0x00000118u, 0x00000099u, 0x000500a7u,
0x00000081u, 0x0000011au, 0x00000117u, 0x00000119u, 0x000300f7u, 0x0000011cu,
0x00000000u, 0x000400fau, 0x0000011au, 0x0000011bu, 0x0000011cu, 0x000200f8u,
0x0000011bu, 0x0004003du, 0x00000008u, 0x0000011fu, 0x00000027u, 0x0003003eu,
0x0000011eu, 0x0000011fu, 0x0004003du, 0x00000008u, 0x00000121u, 0x00000104u,
0x0003003eu, 0x00000120u, 0x00000121u, 0x0004003du, 0x00000008u, 0x00000123u,
0x00000028u, 0x0003003eu, 0x00000122u, 0x00000123u, 0x00070039u, 0x00000008u,
0x00000124u, 0x00000024u, 0x0000011eu, 0x00000120u, 0x00000122u, 0x0003003eu,
0x0000011du, 0x00000124u, 0x0004003du, 0x00000008u, 0x00000126u, 0x0000011du,
0x0004003du, 0x00000008u, 0x00000127u, 0x00000111u, 0x00050085u, 0x00000008u,
0x00000128u, 0x00000126u, 0x00000127u, 0x0004003du, 0x00000008u, 0x00000129u,
0x0000010du, 0x0004003du, 0x00000008u, 0x0000012au, 0x00000027u, 0x00050085u,
0x00000008u, 0x0000012bu, 0x00000129u, 0x0000012au, 0x0007000cu, 0x00000008u,
0x0000012cu, 0x00000001u, 0x00000028u, 0x0000012bu, 0x00000080u, 0x00050088u,
0x00000008u, 0x0000012du, 0x00000128u, 0x0000012cu, 0x0003003eu, 0x00000125u,
0x0000012du, 0x0004003du, 0x00000008u, 0x0000012fu, 0x00000111u, 0x00050083u,
0x00000008u, 0x00000130u, 0x00000076u, 0x0000012fu, 0x0007000cu, 0x00000008u,
0x00000132u, 0x00000001u, 0x0000001au, 0x00000130u, 0x00000131u, 0x0003003eu,
0x0000012eu, 0x00000132u, 0x0004003du, 0x00000008u, 0x00000133u, 0x0000012eu,
0x00050083u, 0x00000008u, 0x00000134u, 0x00000076u, 0x00000133u, 0x0004003du,
0x00000008u, 0x00000135u, 0x00000125u, 0x00050085u, 0x00000008u, 0x00000136u,
0x00000134u, 0x00000135u, 0x0004003du, 0x00000008u, 0x00000137u, 0x000000e3u,
0x00050081u, 0x00000008u, 0x00000138u, 0x00000137u, 0x00000136u, 0x0003003eu,
0x000000e3u, 0x00000138u, 0x0004003du, 0x00000008u, 0x00000139u, 0x0000012eu,
0x0004003du, 0x00000008u, 0x0000013au, 0x00000125u, 0x00050085u, 0x00000008u,
0x0000013bu, 0x00000139u, 0x0000013au, 0x0004003du, 0x00000008u, 0x0000013cu,
0x000000e4u, 0x00050081u, 0x00000008u, 0x0000013du, 0x0000013cu, 0x0000013bu,
0x0003003eu, 0x000000e4u, 0x0000013du, 0x000200f9u, 0x0000011cu, 0x000200f8u,
0x0000011cu, 0x000200f9u, 0x0000010cu, 0x000200f8u, 0x0000010cu, 0x000200f9u,
0x000000e9u, 0x000200f8u, 0x000000e9u, 0x0004003du, 0x00000006u, 0x0000013eu,
0x000000e5u, 0x00050080u, 0x00000006u, 0x0000013fu, 0x0000013eu, 0x00000037u,
0x0003003eu, 0x000000e5u, 0x0000013fu, 0x000200f9u, 0x000000e6u, 0x000200f8u,
0x000000e8u, 0x0004003du, 0x00000008u, 0x00000140u, 0x000000e3u, 0x0004003du,
0x00000008u, 0x00000141u, 0x000000e4u, 0x00050050u, 0x0000000du, 0x00000142u,
0x00000140u, 0x00000141u, 0x00050050u, 0x0000000du, 0x00000144u, 0x00000143u,
0x00000143u, 0x00050088u, 0x0000000du, 0x00000145u, 0x00000142u, 0x00000144u,
0x000200feu, 0x00000145u, 0x00010038u,
};
@@ -0,0 +1,64 @@
// equirect_to_cube.comp — P4-05: equirect HDR -> cubemap face conversion.
//
// One invocation per cubemap texel (face = gl_WorkGroupID.z mapped from
// the dispatch z dimension, or the push-constant face for drivers that
// need it — here z-dispatch: dispatch (size/16, size/16, 6)).
// Reads the float equirect (set 0 binding 0, R32G32B32A32_SFLOAT sampled)
// with a CLAMP_TO_EDGE linear sampler; writes one RGBA32F texel into the
// cubemap layer (set 0 binding 1, rgba32f storage image, layer selected
// by gl_GlobalInvocationID.z).
//
// Direction math mirrors SkyboxFaceDir() in
// skybox_image_based_lighting.hpp term for term (+Y up, +X/-X/+Y/-Y/+Z/-Z
// layer order, (u,v) in [-1,1] from texel centers, texel x right / y
// down). Sky zenith lands at the middle of the equirect's top row.
// Linear HDR throughout: no sRGB anywhere (the P4-02 post pass tonemaps
// at frame time).
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into equirect_to_cube_spv.inc (both shader dirs).
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout(set = 0, binding = 0) uniform sampler2D u_equirect;
layout(set = 0, binding = 1, rgba32f) uniform writeonly image2DArray u_cube;
layout(push_constant, scalar) uniform CubePush {
uint face_size; // cubemap edge in texels (dispatch x/y cover it)
} g_push;
vec3 face_dir(uint face, uint x, uint y, uint size) {
float u = (float(x) + 0.5) / float(size) * 2.0 - 1.0;
float v = (float(y) + 0.5) / float(size) * 2.0 - 1.0;
vec3 d = vec3(0.0, 0.0, 0.0);
switch (face) {
case 0: d = vec3(1.0, -v, -u); break; // +X
case 1: d = vec3(-1.0, -v, u); break; // -X
case 2: d = vec3(u, 1.0, v); break; // +Y
case 3: d = vec3(u, -1.0, -v); break; // -Y
case 4: d = vec3(u, -v, 1.0); break; // +Z
default: d = vec3(-u, -v, -1.0); break; // -Z
}
return normalize(d);
}
void main() {
uint face = gl_GlobalInvocationID.z;
uint x = gl_GlobalInvocationID.x;
uint y = gl_GlobalInvocationID.y;
if (face >= 6u || x >= g_push.face_size || y >= g_push.face_size) {
return;
}
vec3 d = face_dir(face, x, y, g_push.face_size);
// Direction -> equirect UV (mirrors SkyboxDirToUv term for term:
// u = 0.5 + atan(x, z)/2pi wrapped, v = acos(clamp(y))/pi).
float u = 0.5 + atan(d.x, d.z) / 6.283185307179586;
u = fract(u);
float v = acos(clamp(d.y, -1.0, 1.0)) / 3.141592653589793;
vec4 hdr = texture(u_equirect, vec2(u, v));
imageStore(u_cube, ivec3(int(x), int(y), int(face)),
vec4(hdr.rgb, 1.0));
}
@@ -0,0 +1,190 @@
// equirect_to_cube.spv — 1087 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -o equirect_to_cube.spv equirect_to_cube.comp
// then: python3 native/renderer/shaders/embed_spv.py equirect_to_cube.spv equirect_to_cube_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kEquirect_to_cubeSpvWords = 1087u;
inline constexpr std::uint32_t kEquirect_to_cubeSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x000000c3u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000005bu, 0x00000072u, 0x000000a8u,
0x000000b1u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00030005u, 0x00000012u, 0x00000075u, 0x00030005u,
0x0000001eu, 0x00000076u, 0x00030005u, 0x00000028u, 0x00000064u, 0x00040005u,
0x00000058u, 0x65636166u, 0x00000000u, 0x00080005u, 0x0000005bu, 0x475f6c67u,
0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00030005u,
0x00000060u, 0x00000078u, 0x00030005u, 0x00000064u, 0x00000079u, 0x00050005u,
0x00000070u, 0x65627543u, 0x68737550u, 0x00000000u, 0x00060006u, 0x00000070u,
0x00000000u, 0x65636166u, 0x7a69735fu, 0x00000065u, 0x00040005u, 0x00000072u,
0x75705f67u, 0x00006873u, 0x00030005u, 0x00000085u, 0x00000064u, 0x00040005u,
0x00000086u, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000088u, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000008au, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000008cu, 0x61726170u, 0x0000006du, 0x00030005u, 0x00000090u, 0x00000075u,
0x00030005u, 0x0000009bu, 0x00000076u, 0x00030005u, 0x000000a4u, 0x00726468u,
0x00050005u, 0x000000a8u, 0x71655f75u, 0x65726975u, 0x00007463u, 0x00040005u,
0x000000b1u, 0x75635f75u, 0x00006562u, 0x00040047u, 0x0000005bu, 0x0000000bu,
0x0000001cu, 0x00030047u, 0x00000070u, 0x00000002u, 0x00050048u, 0x00000070u,
0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x000000a8u, 0x00000021u,
0x00000000u, 0x00040047u, 0x000000a8u, 0x00000022u, 0x00000000u, 0x00030047u,
0x000000b1u, 0x00000019u, 0x00040047u, 0x000000b1u, 0x00000021u, 0x00000001u,
0x00040047u, 0x000000b1u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u,
0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u,
0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u,
0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u, 0x00000008u, 0x00000003u,
0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u, 0x00000007u, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u, 0x00000008u, 0x0004002bu,
0x00000008u, 0x00000015u, 0x3f000000u, 0x0004002bu, 0x00000008u, 0x0000001au,
0x40000000u, 0x0004002bu, 0x00000008u, 0x0000001cu, 0x3f800000u, 0x00040020u,
0x00000027u, 0x00000007u, 0x00000009u, 0x0004002bu, 0x00000008u, 0x00000029u,
0x00000000u, 0x0006002cu, 0x00000009u, 0x0000002au, 0x00000029u, 0x00000029u,
0x00000029u, 0x0004002bu, 0x00000008u, 0x00000039u, 0xbf800000u, 0x00040017u,
0x00000059u, 0x00000006u, 0x00000003u, 0x00040020u, 0x0000005au, 0x00000001u,
0x00000059u, 0x0004003bu, 0x0000005au, 0x0000005bu, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000005cu, 0x00000002u, 0x00040020u, 0x0000005du, 0x00000001u,
0x00000006u, 0x0004002bu, 0x00000006u, 0x00000061u, 0x00000000u, 0x0004002bu,
0x00000006u, 0x00000065u, 0x00000001u, 0x00020014u, 0x00000068u, 0x0004002bu,
0x00000006u, 0x0000006au, 0x00000006u, 0x0003001eu, 0x00000070u, 0x00000006u,
0x00040020u, 0x00000071u, 0x00000009u, 0x00000070u, 0x0004003bu, 0x00000071u,
0x00000072u, 0x00000009u, 0x00040015u, 0x00000073u, 0x00000020u, 0x00000001u,
0x0004002bu, 0x00000073u, 0x00000074u, 0x00000000u, 0x00040020u, 0x00000075u,
0x00000009u, 0x00000006u, 0x0004002bu, 0x00000008u, 0x00000096u, 0x40c90fdbu,
0x0004002bu, 0x00000008u, 0x000000a0u, 0x40490fdbu, 0x00040017u, 0x000000a2u,
0x00000008u, 0x00000004u, 0x00040020u, 0x000000a3u, 0x00000007u, 0x000000a2u,
0x00090019u, 0x000000a5u, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000a6u, 0x000000a5u,
0x00040020u, 0x000000a7u, 0x00000000u, 0x000000a6u, 0x0004003bu, 0x000000a7u,
0x000000a8u, 0x00000000u, 0x00040017u, 0x000000acu, 0x00000008u, 0x00000002u,
0x00090019u, 0x000000afu, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u,
0x00000000u, 0x00000002u, 0x00000001u, 0x00040020u, 0x000000b0u, 0x00000000u,
0x000000afu, 0x0004003bu, 0x000000b0u, 0x000000b1u, 0x00000000u, 0x00040017u,
0x000000b9u, 0x00000073u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x000000c1u,
0x00000010u, 0x0006002cu, 0x00000059u, 0x000000c2u, 0x000000c1u, 0x000000c1u,
0x00000065u, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u,
0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000007u, 0x00000058u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000060u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000064u, 0x00000007u, 0x0004003bu, 0x00000027u, 0x00000085u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000086u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000088u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x0000008au, 0x00000007u,
0x0004003bu, 0x00000007u, 0x0000008cu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000090u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000009bu, 0x00000007u,
0x0004003bu, 0x000000a3u, 0x000000a4u, 0x00000007u, 0x00050041u, 0x0000005du,
0x0000005eu, 0x0000005bu, 0x0000005cu, 0x0004003du, 0x00000006u, 0x0000005fu,
0x0000005eu, 0x0003003eu, 0x00000058u, 0x0000005fu, 0x00050041u, 0x0000005du,
0x00000062u, 0x0000005bu, 0x00000061u, 0x0004003du, 0x00000006u, 0x00000063u,
0x00000062u, 0x0003003eu, 0x00000060u, 0x00000063u, 0x00050041u, 0x0000005du,
0x00000066u, 0x0000005bu, 0x00000065u, 0x0004003du, 0x00000006u, 0x00000067u,
0x00000066u, 0x0003003eu, 0x00000064u, 0x00000067u, 0x0004003du, 0x00000006u,
0x00000069u, 0x00000058u, 0x000500aeu, 0x00000068u, 0x0000006bu, 0x00000069u,
0x0000006au, 0x000400a8u, 0x00000068u, 0x0000006cu, 0x0000006bu, 0x000300f7u,
0x0000006eu, 0x00000000u, 0x000400fau, 0x0000006cu, 0x0000006du, 0x0000006eu,
0x000200f8u, 0x0000006du, 0x0004003du, 0x00000006u, 0x0000006fu, 0x00000060u,
0x00050041u, 0x00000075u, 0x00000076u, 0x00000072u, 0x00000074u, 0x0004003du,
0x00000006u, 0x00000077u, 0x00000076u, 0x000500aeu, 0x00000068u, 0x00000078u,
0x0000006fu, 0x00000077u, 0x000200f9u, 0x0000006eu, 0x000200f8u, 0x0000006eu,
0x000700f5u, 0x00000068u, 0x00000079u, 0x0000006bu, 0x00000005u, 0x00000078u,
0x0000006du, 0x000400a8u, 0x00000068u, 0x0000007au, 0x00000079u, 0x000300f7u,
0x0000007cu, 0x00000000u, 0x000400fau, 0x0000007au, 0x0000007bu, 0x0000007cu,
0x000200f8u, 0x0000007bu, 0x0004003du, 0x00000006u, 0x0000007du, 0x00000064u,
0x00050041u, 0x00000075u, 0x0000007eu, 0x00000072u, 0x00000074u, 0x0004003du,
0x00000006u, 0x0000007fu, 0x0000007eu, 0x000500aeu, 0x00000068u, 0x00000080u,
0x0000007du, 0x0000007fu, 0x000200f9u, 0x0000007cu, 0x000200f8u, 0x0000007cu,
0x000700f5u, 0x00000068u, 0x00000081u, 0x00000079u, 0x0000006eu, 0x00000080u,
0x0000007bu, 0x000300f7u, 0x00000083u, 0x00000000u, 0x000400fau, 0x00000081u,
0x00000082u, 0x00000083u, 0x000200f8u, 0x00000082u, 0x000100fdu, 0x000200f8u,
0x00000083u, 0x0004003du, 0x00000006u, 0x00000087u, 0x00000058u, 0x0003003eu,
0x00000086u, 0x00000087u, 0x0004003du, 0x00000006u, 0x00000089u, 0x00000060u,
0x0003003eu, 0x00000088u, 0x00000089u, 0x0004003du, 0x00000006u, 0x0000008bu,
0x00000064u, 0x0003003eu, 0x0000008au, 0x0000008bu, 0x00050041u, 0x00000075u,
0x0000008du, 0x00000072u, 0x00000074u, 0x0004003du, 0x00000006u, 0x0000008eu,
0x0000008du, 0x0003003eu, 0x0000008cu, 0x0000008eu, 0x00080039u, 0x00000009u,
0x0000008fu, 0x0000000fu, 0x00000086u, 0x00000088u, 0x0000008au, 0x0000008cu,
0x0003003eu, 0x00000085u, 0x0000008fu, 0x00050041u, 0x00000011u, 0x00000091u,
0x00000085u, 0x00000061u, 0x0004003du, 0x00000008u, 0x00000092u, 0x00000091u,
0x00050041u, 0x00000011u, 0x00000093u, 0x00000085u, 0x0000005cu, 0x0004003du,
0x00000008u, 0x00000094u, 0x00000093u, 0x0007000cu, 0x00000008u, 0x00000095u,
0x00000001u, 0x00000019u, 0x00000092u, 0x00000094u, 0x00050088u, 0x00000008u,
0x00000097u, 0x00000095u, 0x00000096u, 0x00050081u, 0x00000008u, 0x00000098u,
0x00000015u, 0x00000097u, 0x0003003eu, 0x00000090u, 0x00000098u, 0x0004003du,
0x00000008u, 0x00000099u, 0x00000090u, 0x0006000cu, 0x00000008u, 0x0000009au,
0x00000001u, 0x0000000au, 0x00000099u, 0x0003003eu, 0x00000090u, 0x0000009au,
0x00050041u, 0x00000011u, 0x0000009cu, 0x00000085u, 0x00000065u, 0x0004003du,
0x00000008u, 0x0000009du, 0x0000009cu, 0x0008000cu, 0x00000008u, 0x0000009eu,
0x00000001u, 0x0000002bu, 0x0000009du, 0x00000039u, 0x0000001cu, 0x0006000cu,
0x00000008u, 0x0000009fu, 0x00000001u, 0x00000011u, 0x0000009eu, 0x00050088u,
0x00000008u, 0x000000a1u, 0x0000009fu, 0x000000a0u, 0x0003003eu, 0x0000009bu,
0x000000a1u, 0x0004003du, 0x000000a6u, 0x000000a9u, 0x000000a8u, 0x0004003du,
0x00000008u, 0x000000aau, 0x00000090u, 0x0004003du, 0x00000008u, 0x000000abu,
0x0000009bu, 0x00050050u, 0x000000acu, 0x000000adu, 0x000000aau, 0x000000abu,
0x00070058u, 0x000000a2u, 0x000000aeu, 0x000000a9u, 0x000000adu, 0x00000002u,
0x00000029u, 0x0003003eu, 0x000000a4u, 0x000000aeu, 0x0004003du, 0x000000afu,
0x000000b2u, 0x000000b1u, 0x0004003du, 0x00000006u, 0x000000b3u, 0x00000060u,
0x0004007cu, 0x00000073u, 0x000000b4u, 0x000000b3u, 0x0004003du, 0x00000006u,
0x000000b5u, 0x00000064u, 0x0004007cu, 0x00000073u, 0x000000b6u, 0x000000b5u,
0x0004003du, 0x00000006u, 0x000000b7u, 0x00000058u, 0x0004007cu, 0x00000073u,
0x000000b8u, 0x000000b7u, 0x00060050u, 0x000000b9u, 0x000000bau, 0x000000b4u,
0x000000b6u, 0x000000b8u, 0x0004003du, 0x000000a2u, 0x000000bbu, 0x000000a4u,
0x0008004fu, 0x00000009u, 0x000000bcu, 0x000000bbu, 0x000000bbu, 0x00000000u,
0x00000001u, 0x00000002u, 0x00050051u, 0x00000008u, 0x000000bdu, 0x000000bcu,
0x00000000u, 0x00050051u, 0x00000008u, 0x000000beu, 0x000000bcu, 0x00000001u,
0x00050051u, 0x00000008u, 0x000000bfu, 0x000000bcu, 0x00000002u, 0x00070050u,
0x000000a2u, 0x000000c0u, 0x000000bdu, 0x000000beu, 0x000000bfu, 0x0000001cu,
0x00040063u, 0x000000b2u, 0x000000bau, 0x000000c0u, 0x000100fdu, 0x00010038u,
0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u, 0x0000000au, 0x00030037u,
0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u, 0x0000000cu, 0x00030037u,
0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u, 0x0000000eu, 0x000200f8u,
0x00000010u, 0x0004003bu, 0x00000011u, 0x00000012u, 0x00000007u, 0x0004003bu,
0x00000011u, 0x0000001eu, 0x00000007u, 0x0004003bu, 0x00000027u, 0x00000028u,
0x00000007u, 0x0004003du, 0x00000006u, 0x00000013u, 0x0000000cu, 0x00040070u,
0x00000008u, 0x00000014u, 0x00000013u, 0x00050081u, 0x00000008u, 0x00000016u,
0x00000014u, 0x00000015u, 0x0004003du, 0x00000006u, 0x00000017u, 0x0000000eu,
0x00040070u, 0x00000008u, 0x00000018u, 0x00000017u, 0x00050088u, 0x00000008u,
0x00000019u, 0x00000016u, 0x00000018u, 0x00050085u, 0x00000008u, 0x0000001bu,
0x00000019u, 0x0000001au, 0x00050083u, 0x00000008u, 0x0000001du, 0x0000001bu,
0x0000001cu, 0x0003003eu, 0x00000012u, 0x0000001du, 0x0004003du, 0x00000006u,
0x0000001fu, 0x0000000du, 0x00040070u, 0x00000008u, 0x00000020u, 0x0000001fu,
0x00050081u, 0x00000008u, 0x00000021u, 0x00000020u, 0x00000015u, 0x0004003du,
0x00000006u, 0x00000022u, 0x0000000eu, 0x00040070u, 0x00000008u, 0x00000023u,
0x00000022u, 0x00050088u, 0x00000008u, 0x00000024u, 0x00000021u, 0x00000023u,
0x00050085u, 0x00000008u, 0x00000025u, 0x00000024u, 0x0000001au, 0x00050083u,
0x00000008u, 0x00000026u, 0x00000025u, 0x0000001cu, 0x0003003eu, 0x0000001eu,
0x00000026u, 0x0003003eu, 0x00000028u, 0x0000002au, 0x0004003du, 0x00000006u,
0x0000002bu, 0x0000000bu, 0x000300f7u, 0x00000032u, 0x00000000u, 0x000d00fbu,
0x0000002bu, 0x00000031u, 0x00000000u, 0x0000002cu, 0x00000001u, 0x0000002du,
0x00000002u, 0x0000002eu, 0x00000003u, 0x0000002fu, 0x00000004u, 0x00000030u,
0x000200f8u, 0x00000031u, 0x0004003du, 0x00000008u, 0x0000004du, 0x00000012u,
0x0004007fu, 0x00000008u, 0x0000004eu, 0x0000004du, 0x0004003du, 0x00000008u,
0x0000004fu, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000050u, 0x0000004fu,
0x00060050u, 0x00000009u, 0x00000051u, 0x0000004eu, 0x00000050u, 0x00000039u,
0x0003003eu, 0x00000028u, 0x00000051u, 0x000200f9u, 0x00000032u, 0x000200f8u,
0x0000002cu, 0x0004003du, 0x00000008u, 0x00000033u, 0x0000001eu, 0x0004007fu,
0x00000008u, 0x00000034u, 0x00000033u, 0x0004003du, 0x00000008u, 0x00000035u,
0x00000012u, 0x0004007fu, 0x00000008u, 0x00000036u, 0x00000035u, 0x00060050u,
0x00000009u, 0x00000037u, 0x0000001cu, 0x00000034u, 0x00000036u, 0x0003003eu,
0x00000028u, 0x00000037u, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x0000002du,
0x0004003du, 0x00000008u, 0x0000003au, 0x0000001eu, 0x0004007fu, 0x00000008u,
0x0000003bu, 0x0000003au, 0x0004003du, 0x00000008u, 0x0000003cu, 0x00000012u,
0x00060050u, 0x00000009u, 0x0000003du, 0x00000039u, 0x0000003bu, 0x0000003cu,
0x0003003eu, 0x00000028u, 0x0000003du, 0x000200f9u, 0x00000032u, 0x000200f8u,
0x0000002eu, 0x0004003du, 0x00000008u, 0x0000003fu, 0x00000012u, 0x0004003du,
0x00000008u, 0x00000040u, 0x0000001eu, 0x00060050u, 0x00000009u, 0x00000041u,
0x0000003fu, 0x0000001cu, 0x00000040u, 0x0003003eu, 0x00000028u, 0x00000041u,
0x000200f9u, 0x00000032u, 0x000200f8u, 0x0000002fu, 0x0004003du, 0x00000008u,
0x00000043u, 0x00000012u, 0x0004003du, 0x00000008u, 0x00000044u, 0x0000001eu,
0x0004007fu, 0x00000008u, 0x00000045u, 0x00000044u, 0x00060050u, 0x00000009u,
0x00000046u, 0x00000043u, 0x00000039u, 0x00000045u, 0x0003003eu, 0x00000028u,
0x00000046u, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x00000030u, 0x0004003du,
0x00000008u, 0x00000048u, 0x00000012u, 0x0004003du, 0x00000008u, 0x00000049u,
0x0000001eu, 0x0004007fu, 0x00000008u, 0x0000004au, 0x00000049u, 0x00060050u,
0x00000009u, 0x0000004bu, 0x00000048u, 0x0000004au, 0x0000001cu, 0x0003003eu,
0x00000028u, 0x0000004bu, 0x000200f9u, 0x00000032u, 0x000200f8u, 0x00000032u,
0x0004003du, 0x00000009u, 0x00000054u, 0x00000028u, 0x0006000cu, 0x00000009u,
0x00000055u, 0x00000001u, 0x00000045u, 0x00000054u, 0x000200feu, 0x00000055u,
0x00010038u,
};
+94
View File
@@ -0,0 +1,94 @@
// ibl_shade.frag — P4-05: IBL integration-test shade fragment shader.
//
// Test-only split-sum IBL evaluation (mirrors IblEvaluate in
// skybox_ibl.hpp term for term). Screen split: LEFT half = chrome
// sphere (metal 1, rough 0.05) with a HIGH-ALBEDO F0 (1.0: polished
// silver) so its sharp mirror reflection outshines the diffuse-
// dominated right side; RIGHT half = rough dielectric sphere
// (metal 0, rough 0.9, mid-grey albedo 0.5). Sphere normals are
// analytic (z-up dome over each half's disc); outside the discs the
// pixel shows the skybox cubemap sample (same math as skybox.frag,
// exposure 1).
//
// Inputs (set 0): 0 = source cubemap sampler, 1 = irradiance sampler,
// 2 = prefilter sampler (base mip; test prefilter has 1 mip at its edge
// so no explicit LOD needed), 3 = BRDF LUT sampler. Push: inv-view 3x3.
// Outputs linear-HDR (alpha 1); the test compares against the CPU
// IblEvaluate reference — no tonemap here.
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into ibl_shade_frag_spv.inc (both shader dirs).
#version 460
layout(location = 0) in vec2 v_uv;
layout(location = 0) out vec4 o_color;
layout(set = 0, binding = 0) uniform samplerCube u_cube;
layout(set = 0, binding = 1) uniform samplerCube u_irr;
layout(set = 0, binding = 2) uniform samplerCube u_pref;
layout(set = 0, binding = 3) uniform sampler2D u_lut;
layout(push_constant) uniform IblShadePush {
float inv_view_0;
float inv_view_1;
float inv_view_2;
float inv_view_3;
float inv_view_4;
float inv_view_5;
float inv_view_6;
float inv_view_7;
float inv_view_8;
} g_push;
vec3 view_dir(vec2 ndc) {
vec3 v = vec3(ndc, -1.0);
vec3 d = vec3(
g_push.inv_view_0 * v.x + g_push.inv_view_1 * v.y + g_push.inv_view_2 * v.z,
g_push.inv_view_3 * v.x + g_push.inv_view_4 * v.y + g_push.inv_view_5 * v.z,
g_push.inv_view_6 * v.x + g_push.inv_view_7 * v.y + g_push.inv_view_8 * v.z);
return normalize(d);
}
// Analytic sphere normal: disc center c (uv space), radius r; ndc p.
// Returns true + normal when inside the disc, false otherwise.
bool sphere_normal(vec2 p, vec2 c, float r, out vec3 n) {
vec2 d = (p - c) / r;
float q = dot(d, d);
if (q > 1.0) {
n = vec3(0.0, 0.0, 1.0);
return false;
}
n = normalize(vec3(d.x, d.y, sqrt(max(1.0 - q, 0.0))));
return true;
}
void main() {
vec2 ndc = v_uv * 2.0 - 1.0;
vec3 vdir = view_dir(ndc);
// Chrome disc: left half center; rough disc: right half center.
bool left = v_uv.x < 0.5;
vec2 c = left ? vec2(0.25, 0.5) : vec2(0.75, 0.5);
vec3 n;
if (!sphere_normal(v_uv, c, 0.38, n)) {
o_color = vec4(texture(u_cube, vdir).rgb, 1.0);
return;
}
float metal = left ? 1.0 : 0.0;
float rough = left ? 0.05 : 0.9;
vec3 albedo = left ? vec3(1.0) : vec3(0.5, 0.5, 0.5);
vec3 v = -vdir; // PBR view vector: surface -> camera.
vec3 rdir = reflect(vdir, n);
float ndv = max(dot(n, v), 0.0);
vec3 irr = texture(u_irr, n).rgb;
// Explicit LOD: roughness selects the prefilter mip (mirrors
// PrefilterMipRoughness: rough = mip/(count-1)). The pre-pass fills
// every mip, so no level reads uninitialized memory.
vec3 pref =
textureLod(u_pref, rdir, rough * float(textureQueryLevels(u_pref) - 1))
.rgb;
vec2 lut = texture(u_lut, vec2(ndv, rough)).rg;
vec3 f0 = mix(vec3(0.04), albedo, metal);
vec3 spec = pref * (f0 * lut.x + lut.y);
vec3 diff = albedo * (1.0 - metal) * irr / 3.141592653589793;
o_color = vec4(diff + spec, 1.0);
}
+25
View File
@@ -0,0 +1,25 @@
// ibl_shade.vert — P4-05: IBL integration-test shade vertex shader.
//
// Fullscreen triangle passthrough (gl_VertexIndex only, no vertex input).
// Test-only: production PBR wiring lives in pbr_shade.slang (slangc-gated);
// this GLSL pair proves the IBL math end-to-end (split-sum evaluate +
// analytic sphere normals) on lavapipe without new slang blobs.
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into ibl_shade_vert_spv.inc (both shader dirs).
#version 460
layout(location = 0) out vec2 v_uv;
void main() {
vec2 pos = vec2(0.0);
if (gl_VertexIndex == 0) {
pos = vec2(-1.0, -1.0);
} else if (gl_VertexIndex == 1) {
pos = vec2(3.0, -1.0);
} else {
pos = vec2(-1.0, 3.0);
}
v_uv = pos * 0.5 + 0.5;
gl_Position = vec4(pos, 0.0, 1.0);
}
@@ -0,0 +1,291 @@
// ibl_shade_frag.spv — 1694 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S frag -o ibl_shade_frag.spv ibl_shade.frag
// then: python3 native/renderer/shaders/embed_spv.py ibl_shade_frag.spv ibl_shade_frag_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIbl_shade_fragSpvWords = 1694u;
inline constexpr std::uint32_t kIbl_shade_fragSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x0000011bu, 0x00000000u, 0x00020011u,
0x00000001u, 0x00020011u, 0x00000032u, 0x0006000bu, 0x00000001u, 0x4c534c47u,
0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
0x000c000fu, 0x00000004u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000021u,
0x0000008cu, 0x000000b3u, 0x000000b7u, 0x000000dbu, 0x000000e1u, 0x000000f1u,
0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u, 0x000001ccu,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00060005u, 0x0000000cu,
0x77656976u, 0x7269645fu, 0x32667628u, 0x0000003bu, 0x00030005u, 0x0000000bu,
0x0063646eu, 0x000a0005u, 0x00000016u, 0x65687073u, 0x6e5f6572u, 0x616d726fu,
0x6676286cu, 0x66763b32u, 0x31663b32u, 0x3366763bu, 0x0000003bu, 0x00030005u,
0x00000012u, 0x00000070u, 0x00030005u, 0x00000013u, 0x00000063u, 0x00030005u,
0x00000014u, 0x00000072u, 0x00030005u, 0x00000015u, 0x0000006eu, 0x00030005u,
0x00000018u, 0x00000076u, 0x00030005u, 0x0000001eu, 0x00000064u, 0x00060005u,
0x0000001fu, 0x536c6249u, 0x65646168u, 0x68737550u, 0x00000000u, 0x00060006u,
0x0000001fu, 0x00000000u, 0x5f766e69u, 0x77656976u, 0x0000305fu, 0x00060006u,
0x0000001fu, 0x00000001u, 0x5f766e69u, 0x77656976u, 0x0000315fu, 0x00060006u,
0x0000001fu, 0x00000002u, 0x5f766e69u, 0x77656976u, 0x0000325fu, 0x00060006u,
0x0000001fu, 0x00000003u, 0x5f766e69u, 0x77656976u, 0x0000335fu, 0x00060006u,
0x0000001fu, 0x00000004u, 0x5f766e69u, 0x77656976u, 0x0000345fu, 0x00060006u,
0x0000001fu, 0x00000005u, 0x5f766e69u, 0x77656976u, 0x0000355fu, 0x00060006u,
0x0000001fu, 0x00000006u, 0x5f766e69u, 0x77656976u, 0x0000365fu, 0x00060006u,
0x0000001fu, 0x00000007u, 0x5f766e69u, 0x77656976u, 0x0000375fu, 0x00060006u,
0x0000001fu, 0x00000008u, 0x5f766e69u, 0x77656976u, 0x0000385fu, 0x00040005u,
0x00000021u, 0x75705f67u, 0x00006873u, 0x00030005u, 0x00000069u, 0x00000064u,
0x00030005u, 0x00000070u, 0x00000071u, 0x00030005u, 0x0000008au, 0x0063646eu,
0x00040005u, 0x0000008cu, 0x76755f76u, 0x00000000u, 0x00040005u, 0x00000092u,
0x72696476u, 0x00000000u, 0x00040005u, 0x00000093u, 0x61726170u, 0x0000006du,
0x00040005u, 0x00000097u, 0x7466656cu, 0x00000000u, 0x00030005u, 0x0000009du,
0x00000063u, 0x00030005u, 0x000000a5u, 0x0000006eu, 0x00040005u, 0x000000a6u,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000a8u, 0x61726170u, 0x0000006du,
0x00040005u, 0x000000aau, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000abu,
0x61726170u, 0x0000006du, 0x00040005u, 0x000000b3u, 0x6f635f6fu, 0x00726f6cu,
0x00040005u, 0x000000b7u, 0x75635f75u, 0x00006562u, 0x00040005u, 0x000000c1u,
0x6174656du, 0x0000006cu, 0x00040005u, 0x000000c4u, 0x67756f72u, 0x00000068u,
0x00040005u, 0x000000c9u, 0x65626c61u, 0x00006f64u, 0x00030005u, 0x000000ceu,
0x00000076u, 0x00040005u, 0x000000d1u, 0x72696472u, 0x00000000u, 0x00030005u,
0x000000d5u, 0x0076646eu, 0x00030005u, 0x000000dau, 0x00727269u, 0x00040005u,
0x000000dbu, 0x72695f75u, 0x00000072u, 0x00040005u, 0x000000e0u, 0x66657270u,
0x00000000u, 0x00040005u, 0x000000e1u, 0x72705f75u, 0x00006665u, 0x00030005u,
0x000000edu, 0x0074756cu, 0x00040005u, 0x000000f1u, 0x756c5f75u, 0x00000074u,
0x00030005u, 0x000000f8u, 0x00003066u, 0x00040005u, 0x000000ffu, 0x63657073u,
0x00000000u, 0x00040005u, 0x0000010au, 0x66666964u, 0x00000000u, 0x00030047u,
0x0000001fu, 0x00000002u, 0x00050048u, 0x0000001fu, 0x00000000u, 0x00000023u,
0x00000000u, 0x00050048u, 0x0000001fu, 0x00000001u, 0x00000023u, 0x00000004u,
0x00050048u, 0x0000001fu, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u,
0x0000001fu, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x0000001fu,
0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x0000001fu, 0x00000005u,
0x00000023u, 0x00000014u, 0x00050048u, 0x0000001fu, 0x00000006u, 0x00000023u,
0x00000018u, 0x00050048u, 0x0000001fu, 0x00000007u, 0x00000023u, 0x0000001cu,
0x00050048u, 0x0000001fu, 0x00000008u, 0x00000023u, 0x00000020u, 0x00040047u,
0x0000008cu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x000000b3u, 0x0000001eu,
0x00000000u, 0x00040047u, 0x000000b7u, 0x00000021u, 0x00000000u, 0x00040047u,
0x000000b7u, 0x00000022u, 0x00000000u, 0x00040047u, 0x000000dbu, 0x00000021u,
0x00000001u, 0x00040047u, 0x000000dbu, 0x00000022u, 0x00000000u, 0x00040047u,
0x000000e1u, 0x00000021u, 0x00000002u, 0x00040047u, 0x000000e1u, 0x00000022u,
0x00000000u, 0x00040047u, 0x000000f1u, 0x00000021u, 0x00000003u, 0x00040047u,
0x000000f1u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x00040017u, 0x00000009u, 0x00000006u, 0x00000003u, 0x00040021u,
0x0000000au, 0x00000009u, 0x00000008u, 0x00040020u, 0x0000000eu, 0x00000007u,
0x00000006u, 0x00040020u, 0x0000000fu, 0x00000007u, 0x00000009u, 0x00020014u,
0x00000010u, 0x00070021u, 0x00000011u, 0x00000010u, 0x00000008u, 0x00000008u,
0x0000000eu, 0x0000000fu, 0x0004002bu, 0x00000006u, 0x0000001au, 0xbf800000u,
0x000b001eu, 0x0000001fu, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u,
0x00000020u, 0x00000009u, 0x0000001fu, 0x0004003bu, 0x00000020u, 0x00000021u,
0x00000009u, 0x00040015u, 0x00000022u, 0x00000020u, 0x00000001u, 0x0004002bu,
0x00000022u, 0x00000023u, 0x00000000u, 0x00040020u, 0x00000024u, 0x00000009u,
0x00000006u, 0x00040015u, 0x00000027u, 0x00000020u, 0x00000000u, 0x0004002bu,
0x00000027u, 0x00000028u, 0x00000000u, 0x0004002bu, 0x00000022u, 0x0000002cu,
0x00000001u, 0x0004002bu, 0x00000027u, 0x0000002fu, 0x00000001u, 0x0004002bu,
0x00000022u, 0x00000034u, 0x00000002u, 0x0004002bu, 0x00000027u, 0x00000037u,
0x00000002u, 0x0004002bu, 0x00000022u, 0x0000003cu, 0x00000003u, 0x0004002bu,
0x00000022u, 0x00000042u, 0x00000004u, 0x0004002bu, 0x00000022u, 0x00000049u,
0x00000005u, 0x0004002bu, 0x00000022u, 0x00000050u, 0x00000006u, 0x0004002bu,
0x00000022u, 0x00000056u, 0x00000007u, 0x0004002bu, 0x00000022u, 0x0000005du,
0x00000008u, 0x0004002bu, 0x00000006u, 0x00000075u, 0x3f800000u, 0x0004002bu,
0x00000006u, 0x00000079u, 0x00000000u, 0x0006002cu, 0x00000009u, 0x0000007au,
0x00000079u, 0x00000079u, 0x00000075u, 0x0003002au, 0x00000010u, 0x0000007bu,
0x00030029u, 0x00000010u, 0x00000087u, 0x00040020u, 0x0000008bu, 0x00000001u,
0x00000007u, 0x0004003bu, 0x0000008bu, 0x0000008cu, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000008eu, 0x40000000u, 0x00040020u, 0x00000096u, 0x00000007u,
0x00000010u, 0x00040020u, 0x00000098u, 0x00000001u, 0x00000006u, 0x0004002bu,
0x00000006u, 0x0000009bu, 0x3f000000u, 0x0004002bu, 0x00000006u, 0x0000009fu,
0x3e800000u, 0x0005002cu, 0x00000007u, 0x000000a0u, 0x0000009fu, 0x0000009bu,
0x0004002bu, 0x00000006u, 0x000000a1u, 0x3f400000u, 0x0005002cu, 0x00000007u,
0x000000a2u, 0x000000a1u, 0x0000009bu, 0x0004002bu, 0x00000006u, 0x000000a4u,
0x3ec28f5cu, 0x00040017u, 0x000000b1u, 0x00000006u, 0x00000004u, 0x00040020u,
0x000000b2u, 0x00000003u, 0x000000b1u, 0x0004003bu, 0x000000b2u, 0x000000b3u,
0x00000003u, 0x00090019u, 0x000000b4u, 0x00000006u, 0x00000003u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000b5u,
0x000000b4u, 0x00040020u, 0x000000b6u, 0x00000000u, 0x000000b5u, 0x0004003bu,
0x000000b6u, 0x000000b7u, 0x00000000u, 0x0004002bu, 0x00000006u, 0x000000c6u,
0x3d4ccccdu, 0x0004002bu, 0x00000006u, 0x000000c7u, 0x3f666666u, 0x0006002cu,
0x00000009u, 0x000000cbu, 0x00000075u, 0x00000075u, 0x00000075u, 0x0006002cu,
0x00000009u, 0x000000ccu, 0x0000009bu, 0x0000009bu, 0x0000009bu, 0x0004003bu,
0x000000b6u, 0x000000dbu, 0x00000000u, 0x0004003bu, 0x000000b6u, 0x000000e1u,
0x00000000u, 0x00090019u, 0x000000eeu, 0x00000006u, 0x00000001u, 0x00000000u,
0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000000efu,
0x000000eeu, 0x00040020u, 0x000000f0u, 0x00000000u, 0x000000efu, 0x0004003bu,
0x000000f0u, 0x000000f1u, 0x00000000u, 0x0004002bu, 0x00000006u, 0x000000f9u,
0x3d23d70au, 0x0006002cu, 0x00000009u, 0x000000fau, 0x000000f9u, 0x000000f9u,
0x000000f9u, 0x0004002bu, 0x00000006u, 0x00000111u, 0x40490fdbu, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000008u, 0x0000008au, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x00000092u, 0x00000007u, 0x0004003bu, 0x00000008u, 0x00000093u, 0x00000007u,
0x0004003bu, 0x00000096u, 0x00000097u, 0x00000007u, 0x0004003bu, 0x00000008u,
0x0000009du, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000a5u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x000000a6u, 0x00000007u, 0x0004003bu, 0x00000008u,
0x000000a8u, 0x00000007u, 0x0004003bu, 0x0000000eu, 0x000000aau, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x000000abu, 0x00000007u, 0x0004003bu, 0x0000000eu,
0x000000c1u, 0x00000007u, 0x0004003bu, 0x0000000eu, 0x000000c4u, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x000000c9u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000ceu, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000d1u, 0x00000007u,
0x0004003bu, 0x0000000eu, 0x000000d5u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000dau, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000e0u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x000000edu, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x000000f8u, 0x00000007u, 0x0004003bu, 0x0000000fu, 0x000000ffu, 0x00000007u,
0x0004003bu, 0x0000000fu, 0x0000010au, 0x00000007u, 0x0004003du, 0x00000007u,
0x0000008du, 0x0000008cu, 0x0005008eu, 0x00000007u, 0x0000008fu, 0x0000008du,
0x0000008eu, 0x00050050u, 0x00000007u, 0x00000090u, 0x00000075u, 0x00000075u,
0x00050083u, 0x00000007u, 0x00000091u, 0x0000008fu, 0x00000090u, 0x0003003eu,
0x0000008au, 0x00000091u, 0x0004003du, 0x00000007u, 0x00000094u, 0x0000008au,
0x0003003eu, 0x00000093u, 0x00000094u, 0x00050039u, 0x00000009u, 0x00000095u,
0x0000000cu, 0x00000093u, 0x0003003eu, 0x00000092u, 0x00000095u, 0x00050041u,
0x00000098u, 0x00000099u, 0x0000008cu, 0x00000028u, 0x0004003du, 0x00000006u,
0x0000009au, 0x00000099u, 0x000500b8u, 0x00000010u, 0x0000009cu, 0x0000009au,
0x0000009bu, 0x0003003eu, 0x00000097u, 0x0000009cu, 0x0004003du, 0x00000010u,
0x0000009eu, 0x00000097u, 0x000600a9u, 0x00000007u, 0x000000a3u, 0x0000009eu,
0x000000a0u, 0x000000a2u, 0x0003003eu, 0x0000009du, 0x000000a3u, 0x0004003du,
0x00000007u, 0x000000a7u, 0x0000008cu, 0x0003003eu, 0x000000a6u, 0x000000a7u,
0x0004003du, 0x00000007u, 0x000000a9u, 0x0000009du, 0x0003003eu, 0x000000a8u,
0x000000a9u, 0x0003003eu, 0x000000aau, 0x000000a4u, 0x00080039u, 0x00000010u,
0x000000acu, 0x00000016u, 0x000000a6u, 0x000000a8u, 0x000000aau, 0x000000abu,
0x0004003du, 0x00000009u, 0x000000adu, 0x000000abu, 0x0003003eu, 0x000000a5u,
0x000000adu, 0x000400a8u, 0x00000010u, 0x000000aeu, 0x000000acu, 0x000300f7u,
0x000000b0u, 0x00000000u, 0x000400fau, 0x000000aeu, 0x000000afu, 0x000000b0u,
0x000200f8u, 0x000000afu, 0x0004003du, 0x000000b5u, 0x000000b8u, 0x000000b7u,
0x0004003du, 0x00000009u, 0x000000b9u, 0x00000092u, 0x00050057u, 0x000000b1u,
0x000000bau, 0x000000b8u, 0x000000b9u, 0x0008004fu, 0x00000009u, 0x000000bbu,
0x000000bau, 0x000000bau, 0x00000000u, 0x00000001u, 0x00000002u, 0x00050051u,
0x00000006u, 0x000000bcu, 0x000000bbu, 0x00000000u, 0x00050051u, 0x00000006u,
0x000000bdu, 0x000000bbu, 0x00000001u, 0x00050051u, 0x00000006u, 0x000000beu,
0x000000bbu, 0x00000002u, 0x00070050u, 0x000000b1u, 0x000000bfu, 0x000000bcu,
0x000000bdu, 0x000000beu, 0x00000075u, 0x0003003eu, 0x000000b3u, 0x000000bfu,
0x000100fdu, 0x000200f8u, 0x000000b0u, 0x0004003du, 0x00000010u, 0x000000c2u,
0x00000097u, 0x000600a9u, 0x00000006u, 0x000000c3u, 0x000000c2u, 0x00000075u,
0x00000079u, 0x0003003eu, 0x000000c1u, 0x000000c3u, 0x0004003du, 0x00000010u,
0x000000c5u, 0x00000097u, 0x000600a9u, 0x00000006u, 0x000000c8u, 0x000000c5u,
0x000000c6u, 0x000000c7u, 0x0003003eu, 0x000000c4u, 0x000000c8u, 0x0004003du,
0x00000010u, 0x000000cau, 0x00000097u, 0x000600a9u, 0x00000009u, 0x000000cdu,
0x000000cau, 0x000000cbu, 0x000000ccu, 0x0003003eu, 0x000000c9u, 0x000000cdu,
0x0004003du, 0x00000009u, 0x000000cfu, 0x00000092u, 0x0004007fu, 0x00000009u,
0x000000d0u, 0x000000cfu, 0x0003003eu, 0x000000ceu, 0x000000d0u, 0x0004003du,
0x00000009u, 0x000000d2u, 0x00000092u, 0x0004003du, 0x00000009u, 0x000000d3u,
0x000000a5u, 0x0007000cu, 0x00000009u, 0x000000d4u, 0x00000001u, 0x00000047u,
0x000000d2u, 0x000000d3u, 0x0003003eu, 0x000000d1u, 0x000000d4u, 0x0004003du,
0x00000009u, 0x000000d6u, 0x000000a5u, 0x0004003du, 0x00000009u, 0x000000d7u,
0x000000ceu, 0x00050094u, 0x00000006u, 0x000000d8u, 0x000000d6u, 0x000000d7u,
0x0007000cu, 0x00000006u, 0x000000d9u, 0x00000001u, 0x00000028u, 0x000000d8u,
0x00000079u, 0x0003003eu, 0x000000d5u, 0x000000d9u, 0x0004003du, 0x000000b5u,
0x000000dcu, 0x000000dbu, 0x0004003du, 0x00000009u, 0x000000ddu, 0x000000a5u,
0x00050057u, 0x000000b1u, 0x000000deu, 0x000000dcu, 0x000000ddu, 0x0008004fu,
0x00000009u, 0x000000dfu, 0x000000deu, 0x000000deu, 0x00000000u, 0x00000001u,
0x00000002u, 0x0003003eu, 0x000000dau, 0x000000dfu, 0x0004003du, 0x000000b5u,
0x000000e2u, 0x000000e1u, 0x0004003du, 0x00000009u, 0x000000e3u, 0x000000d1u,
0x0004003du, 0x00000006u, 0x000000e4u, 0x000000c4u, 0x0004003du, 0x000000b5u,
0x000000e5u, 0x000000e1u, 0x00040064u, 0x000000b4u, 0x000000e6u, 0x000000e5u,
0x0004006au, 0x00000022u, 0x000000e7u, 0x000000e6u, 0x00050082u, 0x00000022u,
0x000000e8u, 0x000000e7u, 0x0000002cu, 0x0004006fu, 0x00000006u, 0x000000e9u,
0x000000e8u, 0x00050085u, 0x00000006u, 0x000000eau, 0x000000e4u, 0x000000e9u,
0x00070058u, 0x000000b1u, 0x000000ebu, 0x000000e2u, 0x000000e3u, 0x00000002u,
0x000000eau, 0x0008004fu, 0x00000009u, 0x000000ecu, 0x000000ebu, 0x000000ebu,
0x00000000u, 0x00000001u, 0x00000002u, 0x0003003eu, 0x000000e0u, 0x000000ecu,
0x0004003du, 0x000000efu, 0x000000f2u, 0x000000f1u, 0x0004003du, 0x00000006u,
0x000000f3u, 0x000000d5u, 0x0004003du, 0x00000006u, 0x000000f4u, 0x000000c4u,
0x00050050u, 0x00000007u, 0x000000f5u, 0x000000f3u, 0x000000f4u, 0x00050057u,
0x000000b1u, 0x000000f6u, 0x000000f2u, 0x000000f5u, 0x0007004fu, 0x00000007u,
0x000000f7u, 0x000000f6u, 0x000000f6u, 0x00000000u, 0x00000001u, 0x0003003eu,
0x000000edu, 0x000000f7u, 0x0004003du, 0x00000009u, 0x000000fbu, 0x000000c9u,
0x0004003du, 0x00000006u, 0x000000fcu, 0x000000c1u, 0x00060050u, 0x00000009u,
0x000000fdu, 0x000000fcu, 0x000000fcu, 0x000000fcu, 0x0008000cu, 0x00000009u,
0x000000feu, 0x00000001u, 0x0000002eu, 0x000000fau, 0x000000fbu, 0x000000fdu,
0x0003003eu, 0x000000f8u, 0x000000feu, 0x0004003du, 0x00000009u, 0x00000100u,
0x000000e0u, 0x0004003du, 0x00000009u, 0x00000101u, 0x000000f8u, 0x00050041u,
0x0000000eu, 0x00000102u, 0x000000edu, 0x00000028u, 0x0004003du, 0x00000006u,
0x00000103u, 0x00000102u, 0x0005008eu, 0x00000009u, 0x00000104u, 0x00000101u,
0x00000103u, 0x00050041u, 0x0000000eu, 0x00000105u, 0x000000edu, 0x0000002fu,
0x0004003du, 0x00000006u, 0x00000106u, 0x00000105u, 0x00060050u, 0x00000009u,
0x00000107u, 0x00000106u, 0x00000106u, 0x00000106u, 0x00050081u, 0x00000009u,
0x00000108u, 0x00000104u, 0x00000107u, 0x00050085u, 0x00000009u, 0x00000109u,
0x00000100u, 0x00000108u, 0x0003003eu, 0x000000ffu, 0x00000109u, 0x0004003du,
0x00000009u, 0x0000010bu, 0x000000c9u, 0x0004003du, 0x00000006u, 0x0000010cu,
0x000000c1u, 0x00050083u, 0x00000006u, 0x0000010du, 0x00000075u, 0x0000010cu,
0x0005008eu, 0x00000009u, 0x0000010eu, 0x0000010bu, 0x0000010du, 0x0004003du,
0x00000009u, 0x0000010fu, 0x000000dau, 0x00050085u, 0x00000009u, 0x00000110u,
0x0000010eu, 0x0000010fu, 0x00060050u, 0x00000009u, 0x00000112u, 0x00000111u,
0x00000111u, 0x00000111u, 0x00050088u, 0x00000009u, 0x00000113u, 0x00000110u,
0x00000112u, 0x0003003eu, 0x0000010au, 0x00000113u, 0x0004003du, 0x00000009u,
0x00000114u, 0x0000010au, 0x0004003du, 0x00000009u, 0x00000115u, 0x000000ffu,
0x00050081u, 0x00000009u, 0x00000116u, 0x00000114u, 0x00000115u, 0x00050051u,
0x00000006u, 0x00000117u, 0x00000116u, 0x00000000u, 0x00050051u, 0x00000006u,
0x00000118u, 0x00000116u, 0x00000001u, 0x00050051u, 0x00000006u, 0x00000119u,
0x00000116u, 0x00000002u, 0x00070050u, 0x000000b1u, 0x0000011au, 0x00000117u,
0x00000118u, 0x00000119u, 0x00000075u, 0x0003003eu, 0x000000b3u, 0x0000011au,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u, 0x0000000cu, 0x00000000u,
0x0000000au, 0x00030037u, 0x00000008u, 0x0000000bu, 0x000200f8u, 0x0000000du,
0x0004003bu, 0x0000000fu, 0x00000018u, 0x00000007u, 0x0004003bu, 0x0000000fu,
0x0000001eu, 0x00000007u, 0x0004003du, 0x00000007u, 0x00000019u, 0x0000000bu,
0x00050051u, 0x00000006u, 0x0000001bu, 0x00000019u, 0x00000000u, 0x00050051u,
0x00000006u, 0x0000001cu, 0x00000019u, 0x00000001u, 0x00060050u, 0x00000009u,
0x0000001du, 0x0000001bu, 0x0000001cu, 0x0000001au, 0x0003003eu, 0x00000018u,
0x0000001du, 0x00050041u, 0x00000024u, 0x00000025u, 0x00000021u, 0x00000023u,
0x0004003du, 0x00000006u, 0x00000026u, 0x00000025u, 0x00050041u, 0x0000000eu,
0x00000029u, 0x00000018u, 0x00000028u, 0x0004003du, 0x00000006u, 0x0000002au,
0x00000029u, 0x00050085u, 0x00000006u, 0x0000002bu, 0x00000026u, 0x0000002au,
0x00050041u, 0x00000024u, 0x0000002du, 0x00000021u, 0x0000002cu, 0x0004003du,
0x00000006u, 0x0000002eu, 0x0000002du, 0x00050041u, 0x0000000eu, 0x00000030u,
0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000031u, 0x00000030u,
0x00050085u, 0x00000006u, 0x00000032u, 0x0000002eu, 0x00000031u, 0x00050081u,
0x00000006u, 0x00000033u, 0x0000002bu, 0x00000032u, 0x00050041u, 0x00000024u,
0x00000035u, 0x00000021u, 0x00000034u, 0x0004003du, 0x00000006u, 0x00000036u,
0x00000035u, 0x00050041u, 0x0000000eu, 0x00000038u, 0x00000018u, 0x00000037u,
0x0004003du, 0x00000006u, 0x00000039u, 0x00000038u, 0x00050085u, 0x00000006u,
0x0000003au, 0x00000036u, 0x00000039u, 0x00050081u, 0x00000006u, 0x0000003bu,
0x00000033u, 0x0000003au, 0x00050041u, 0x00000024u, 0x0000003du, 0x00000021u,
0x0000003cu, 0x0004003du, 0x00000006u, 0x0000003eu, 0x0000003du, 0x00050041u,
0x0000000eu, 0x0000003fu, 0x00000018u, 0x00000028u, 0x0004003du, 0x00000006u,
0x00000040u, 0x0000003fu, 0x00050085u, 0x00000006u, 0x00000041u, 0x0000003eu,
0x00000040u, 0x00050041u, 0x00000024u, 0x00000043u, 0x00000021u, 0x00000042u,
0x0004003du, 0x00000006u, 0x00000044u, 0x00000043u, 0x00050041u, 0x0000000eu,
0x00000045u, 0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000046u,
0x00000045u, 0x00050085u, 0x00000006u, 0x00000047u, 0x00000044u, 0x00000046u,
0x00050081u, 0x00000006u, 0x00000048u, 0x00000041u, 0x00000047u, 0x00050041u,
0x00000024u, 0x0000004au, 0x00000021u, 0x00000049u, 0x0004003du, 0x00000006u,
0x0000004bu, 0x0000004au, 0x00050041u, 0x0000000eu, 0x0000004cu, 0x00000018u,
0x00000037u, 0x0004003du, 0x00000006u, 0x0000004du, 0x0000004cu, 0x00050085u,
0x00000006u, 0x0000004eu, 0x0000004bu, 0x0000004du, 0x00050081u, 0x00000006u,
0x0000004fu, 0x00000048u, 0x0000004eu, 0x00050041u, 0x00000024u, 0x00000051u,
0x00000021u, 0x00000050u, 0x0004003du, 0x00000006u, 0x00000052u, 0x00000051u,
0x00050041u, 0x0000000eu, 0x00000053u, 0x00000018u, 0x00000028u, 0x0004003du,
0x00000006u, 0x00000054u, 0x00000053u, 0x00050085u, 0x00000006u, 0x00000055u,
0x00000052u, 0x00000054u, 0x00050041u, 0x00000024u, 0x00000057u, 0x00000021u,
0x00000056u, 0x0004003du, 0x00000006u, 0x00000058u, 0x00000057u, 0x00050041u,
0x0000000eu, 0x00000059u, 0x00000018u, 0x0000002fu, 0x0004003du, 0x00000006u,
0x0000005au, 0x00000059u, 0x00050085u, 0x00000006u, 0x0000005bu, 0x00000058u,
0x0000005au, 0x00050081u, 0x00000006u, 0x0000005cu, 0x00000055u, 0x0000005bu,
0x00050041u, 0x00000024u, 0x0000005eu, 0x00000021u, 0x0000005du, 0x0004003du,
0x00000006u, 0x0000005fu, 0x0000005eu, 0x00050041u, 0x0000000eu, 0x00000060u,
0x00000018u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000061u, 0x00000060u,
0x00050085u, 0x00000006u, 0x00000062u, 0x0000005fu, 0x00000061u, 0x00050081u,
0x00000006u, 0x00000063u, 0x0000005cu, 0x00000062u, 0x00060050u, 0x00000009u,
0x00000064u, 0x0000003bu, 0x0000004fu, 0x00000063u, 0x0003003eu, 0x0000001eu,
0x00000064u, 0x0004003du, 0x00000009u, 0x00000065u, 0x0000001eu, 0x0006000cu,
0x00000009u, 0x00000066u, 0x00000001u, 0x00000045u, 0x00000065u, 0x000200feu,
0x00000066u, 0x00010038u, 0x00050036u, 0x00000010u, 0x00000016u, 0x00000000u,
0x00000011u, 0x00030037u, 0x00000008u, 0x00000012u, 0x00030037u, 0x00000008u,
0x00000013u, 0x00030037u, 0x0000000eu, 0x00000014u, 0x00030037u, 0x0000000fu,
0x00000015u, 0x000200f8u, 0x00000017u, 0x0004003bu, 0x00000008u, 0x00000069u,
0x00000007u, 0x0004003bu, 0x0000000eu, 0x00000070u, 0x00000007u, 0x0004003du,
0x00000007u, 0x0000006au, 0x00000012u, 0x0004003du, 0x00000007u, 0x0000006bu,
0x00000013u, 0x00050083u, 0x00000007u, 0x0000006cu, 0x0000006au, 0x0000006bu,
0x0004003du, 0x00000006u, 0x0000006du, 0x00000014u, 0x00050050u, 0x00000007u,
0x0000006eu, 0x0000006du, 0x0000006du, 0x00050088u, 0x00000007u, 0x0000006fu,
0x0000006cu, 0x0000006eu, 0x0003003eu, 0x00000069u, 0x0000006fu, 0x0004003du,
0x00000007u, 0x00000071u, 0x00000069u, 0x0004003du, 0x00000007u, 0x00000072u,
0x00000069u, 0x00050094u, 0x00000006u, 0x00000073u, 0x00000071u, 0x00000072u,
0x0003003eu, 0x00000070u, 0x00000073u, 0x0004003du, 0x00000006u, 0x00000074u,
0x00000070u, 0x000500bau, 0x00000010u, 0x00000076u, 0x00000074u, 0x00000075u,
0x000300f7u, 0x00000078u, 0x00000000u, 0x000400fau, 0x00000076u, 0x00000077u,
0x00000078u, 0x000200f8u, 0x00000077u, 0x0003003eu, 0x00000015u, 0x0000007au,
0x000200feu, 0x0000007bu, 0x000200f8u, 0x00000078u, 0x00050041u, 0x0000000eu,
0x0000007du, 0x00000069u, 0x00000028u, 0x0004003du, 0x00000006u, 0x0000007eu,
0x0000007du, 0x00050041u, 0x0000000eu, 0x0000007fu, 0x00000069u, 0x0000002fu,
0x0004003du, 0x00000006u, 0x00000080u, 0x0000007fu, 0x0004003du, 0x00000006u,
0x00000081u, 0x00000070u, 0x00050083u, 0x00000006u, 0x00000082u, 0x00000075u,
0x00000081u, 0x0007000cu, 0x00000006u, 0x00000083u, 0x00000001u, 0x00000028u,
0x00000082u, 0x00000079u, 0x0006000cu, 0x00000006u, 0x00000084u, 0x00000001u,
0x0000001fu, 0x00000083u, 0x00060050u, 0x00000009u, 0x00000085u, 0x0000007eu,
0x00000080u, 0x00000084u, 0x0006000cu, 0x00000009u, 0x00000086u, 0x00000001u,
0x00000045u, 0x00000085u, 0x0003003eu, 0x00000015u, 0x00000086u, 0x000200feu,
0x00000087u, 0x00010038u,
};
@@ -0,0 +1,68 @@
// ibl_shade_vert.spv — 359 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S vert -o ibl_shade_vert.spv ibl_shade.vert
// then: python3 native/renderer/shaders/embed_spv.py ibl_shade_vert.spv ibl_shade_vert_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIbl_shade_vertSpvWords = 359u;
inline constexpr std::uint32_t kIbl_shade_vertSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000036u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0008000fu, 0x00000000u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000eu, 0x00000022u, 0x0000002eu,
0x00030003u, 0x00000002u, 0x000001ccu, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00736f70u, 0x00060005u, 0x0000000eu,
0x565f6c67u, 0x65747265u, 0x646e4978u, 0x00007865u, 0x00040005u, 0x00000022u,
0x76755f76u, 0x00000000u, 0x00060005u, 0x0000002cu, 0x505f6c67u, 0x65567265u,
0x78657472u, 0x00000000u, 0x00060006u, 0x0000002cu, 0x00000000u, 0x505f6c67u,
0x7469736fu, 0x006e6f69u, 0x00070006u, 0x0000002cu, 0x00000001u, 0x505f6c67u,
0x746e696fu, 0x657a6953u, 0x00000000u, 0x00070006u, 0x0000002cu, 0x00000002u,
0x435f6c67u, 0x4470696cu, 0x61747369u, 0x0065636eu, 0x00070006u, 0x0000002cu,
0x00000003u, 0x435f6c67u, 0x446c6c75u, 0x61747369u, 0x0065636eu, 0x00030005u,
0x0000002eu, 0x00000000u, 0x00040047u, 0x0000000eu, 0x0000000bu, 0x0000002au,
0x00040047u, 0x00000022u, 0x0000001eu, 0x00000000u, 0x00030047u, 0x0000002cu,
0x00000002u, 0x00050048u, 0x0000002cu, 0x00000000u, 0x0000000bu, 0x00000000u,
0x00050048u, 0x0000002cu, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u,
0x0000002cu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x0000002cu,
0x00000003u, 0x0000000bu, 0x00000004u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x0004002bu, 0x00000006u, 0x0000000au, 0x00000000u, 0x0005002cu,
0x00000007u, 0x0000000bu, 0x0000000au, 0x0000000au, 0x00040015u, 0x0000000cu,
0x00000020u, 0x00000001u, 0x00040020u, 0x0000000du, 0x00000001u, 0x0000000cu,
0x0004003bu, 0x0000000du, 0x0000000eu, 0x00000001u, 0x0004002bu, 0x0000000cu,
0x00000010u, 0x00000000u, 0x00020014u, 0x00000011u, 0x0004002bu, 0x00000006u,
0x00000015u, 0xbf800000u, 0x0005002cu, 0x00000007u, 0x00000016u, 0x00000015u,
0x00000015u, 0x0004002bu, 0x0000000cu, 0x00000019u, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000001du, 0x40400000u, 0x0005002cu, 0x00000007u, 0x0000001eu,
0x0000001du, 0x00000015u, 0x0005002cu, 0x00000007u, 0x00000020u, 0x00000015u,
0x0000001du, 0x00040020u, 0x00000021u, 0x00000003u, 0x00000007u, 0x0004003bu,
0x00000021u, 0x00000022u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x00000024u,
0x3f000000u, 0x00040017u, 0x00000028u, 0x00000006u, 0x00000004u, 0x00040015u,
0x00000029u, 0x00000020u, 0x00000000u, 0x0004002bu, 0x00000029u, 0x0000002au,
0x00000001u, 0x0004001cu, 0x0000002bu, 0x00000006u, 0x0000002au, 0x0006001eu,
0x0000002cu, 0x00000028u, 0x00000006u, 0x0000002bu, 0x0000002bu, 0x00040020u,
0x0000002du, 0x00000003u, 0x0000002cu, 0x0004003bu, 0x0000002du, 0x0000002eu,
0x00000003u, 0x0004002bu, 0x00000006u, 0x00000030u, 0x3f800000u, 0x00040020u,
0x00000034u, 0x00000003u, 0x00000028u, 0x00050036u, 0x00000002u, 0x00000004u,
0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000008u,
0x00000009u, 0x00000007u, 0x0003003eu, 0x00000009u, 0x0000000bu, 0x0004003du,
0x0000000cu, 0x0000000fu, 0x0000000eu, 0x000500aau, 0x00000011u, 0x00000012u,
0x0000000fu, 0x00000010u, 0x000300f7u, 0x00000014u, 0x00000000u, 0x000400fau,
0x00000012u, 0x00000013u, 0x00000017u, 0x000200f8u, 0x00000013u, 0x0003003eu,
0x00000009u, 0x00000016u, 0x000200f9u, 0x00000014u, 0x000200f8u, 0x00000017u,
0x0004003du, 0x0000000cu, 0x00000018u, 0x0000000eu, 0x000500aau, 0x00000011u,
0x0000001au, 0x00000018u, 0x00000019u, 0x000300f7u, 0x0000001cu, 0x00000000u,
0x000400fau, 0x0000001au, 0x0000001bu, 0x0000001fu, 0x000200f8u, 0x0000001bu,
0x0003003eu, 0x00000009u, 0x0000001eu, 0x000200f9u, 0x0000001cu, 0x000200f8u,
0x0000001fu, 0x0003003eu, 0x00000009u, 0x00000020u, 0x000200f9u, 0x0000001cu,
0x000200f8u, 0x0000001cu, 0x000200f9u, 0x00000014u, 0x000200f8u, 0x00000014u,
0x0004003du, 0x00000007u, 0x00000023u, 0x00000009u, 0x0005008eu, 0x00000007u,
0x00000025u, 0x00000023u, 0x00000024u, 0x00050050u, 0x00000007u, 0x00000026u,
0x00000024u, 0x00000024u, 0x00050081u, 0x00000007u, 0x00000027u, 0x00000025u,
0x00000026u, 0x0003003eu, 0x00000022u, 0x00000027u, 0x0004003du, 0x00000007u,
0x0000002fu, 0x00000009u, 0x00050051u, 0x00000006u, 0x00000031u, 0x0000002fu,
0x00000000u, 0x00050051u, 0x00000006u, 0x00000032u, 0x0000002fu, 0x00000001u,
0x00070050u, 0x00000028u, 0x00000033u, 0x00000031u, 0x00000032u, 0x0000000au,
0x00000030u, 0x00050041u, 0x00000034u, 0x00000035u, 0x0000002eu, 0x00000010u,
0x0003003eu, 0x00000035u, 0x00000033u, 0x000100fdu, 0x00010038u,
};
+87
View File
@@ -0,0 +1,87 @@
// irradiance.comp — P4-05: diffuse irradiance cubemap generation.
//
// One invocation per irradiance texel (face = gl_GlobalInvocationID.z,
// dispatch ((size+15)/16, (size+15)/16, 6) with ceil division so tail
// edges < 16 texels still get coverage). Samples the source HDR cubemap
// CLAMP_TO_EDGE linear sampler over a cosine-weighted hemisphere about
// the texel normal (512 stratified samples), accumulating irradiance
// E = pi * mean radiance. Writes RGBA32F (alpha 1) into one layer of the
// irradiance cube (set 0 binding 1, rgba32f storage image2DArray).
//
// Face/dir math mirrors SkyboxFaceDir() in
// skybox_image_based_lighting.hpp term for term (+Y up, layer order
// +X -X +Y -Y +Z -Z, (u,v) in [-1,1] from texel centers).
// Hemisphere math mirrors IblCosineSample/IblBasis in skybox_ibl.hpp.
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into irradiance_spv.inc (both shader dirs).
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout(set = 0, binding = 0) uniform samplerCube u_cube;
layout(set = 0, binding = 1, rgba32f) uniform writeonly image2DArray u_irr;
layout(push_constant, scalar) uniform IrrPush {
uint face_size; // irradiance edge in texels (dispatch x/y cover it)
uint num_samples; // hemisphere samples (spec default 512)
} g_push;
vec3 face_dir(uint face, uint x, uint y, uint size) {
float u = (float(x) + 0.5) / float(size) * 2.0 - 1.0;
float v = (float(y) + 0.5) / float(size) * 2.0 - 1.0;
vec3 d = vec3(0.0, 0.0, 0.0);
switch (face) {
case 0: d = vec3(1.0, -v, -u); break; // +X
case 1: d = vec3(-1.0, -v, u); break; // -X
case 2: d = vec3(u, 1.0, v); break; // +Y
case 3: d = vec3(u, -1.0, -v); break; // -Y
case 4: d = vec3(u, -v, 1.0); break; // +Z
default: d = vec3(-u, -v, -1.0); break; // -Z
}
return normalize(d);
}
void basis(vec3 n, out vec3 t, out vec3 b) {
vec3 a = vec3(0.0);
if (abs(n.x) < abs(n.y) && abs(n.x) < abs(n.z)) {
a = vec3(1.0, 0.0, 0.0);
} else if (abs(n.y) < abs(n.z)) {
a = vec3(0.0, 1.0, 0.0);
} else {
a = vec3(0.0, 0.0, 1.0);
}
t = normalize(cross(n, a));
b = cross(n, t);
}
vec3 cosine_sample(float u1, float u2) {
float r = sqrt(max(u1, 0.0));
float phi = 6.283185307179586 * u2;
return vec3(r * cos(phi), r * sin(phi), sqrt(max(1.0 - u1, 0.0)));
}
void main() {
uint face = gl_GlobalInvocationID.z;
uint x = gl_GlobalInvocationID.x;
uint y = gl_GlobalInvocationID.y;
if (face >= 6u || x >= g_push.face_size || y >= g_push.face_size) {
return;
}
vec3 n = face_dir(face, x, y, g_push.face_size);
vec3 t;
vec3 b;
basis(n, t, b);
uint count = g_push.num_samples > 0u ? g_push.num_samples : 512u;
vec3 acc = vec3(0.0);
for (uint i = 0u; i < count; ++i) {
float u1 = (float(i) + 0.5) / float(count);
float u2 = fract(float(i) * 0.618033988749895);
vec3 h = cosine_sample(u1, u2);
vec3 d = t * h.x + b * h.y + n * h.z;
acc += texture(u_cube, d).rgb;
}
vec3 irr = acc * (3.141592653589793 / float(count));
imageStore(u_irr, ivec3(int(x), int(y), int(face)), vec4(irr, 1.0));
}
+315
View File
@@ -0,0 +1,315 @@
// irradiance.spv — 1842 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S comp -o irradiance.spv irradiance.comp
// then: python3 native/renderer/shaders/embed_spv.py irradiance.spv irradiance_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kIrradianceSpvWords = 1842u;
inline constexpr std::uint32_t kIrradianceSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000144u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x000000aau, 0x000000bdu, 0x00000120u,
0x00000133u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00070005u, 0x00000016u, 0x69736162u, 0x66762873u,
0x66763b33u, 0x66763b33u, 0x00003b33u, 0x00030005u, 0x00000013u, 0x0000006eu,
0x00030005u, 0x00000014u, 0x00000074u, 0x00030005u, 0x00000015u, 0x00000062u,
0x00080005u, 0x0000001cu, 0x69736f63u, 0x735f656eu, 0x6c706d61u, 0x31662865u,
0x3b31663bu, 0x00000000u, 0x00030005u, 0x0000001au, 0x00003175u, 0x00030005u,
0x0000001bu, 0x00003275u, 0x00030005u, 0x0000001eu, 0x00000075u, 0x00030005u,
0x0000002au, 0x00000076u, 0x00030005u, 0x00000033u, 0x00000064u, 0x00030005u,
0x00000063u, 0x00000061u, 0x00030005u, 0x00000090u, 0x00000072u, 0x00030005u,
0x00000094u, 0x00696870u, 0x00040005u, 0x000000a7u, 0x65636166u, 0x00000000u,
0x00080005u, 0x000000aau, 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu,
0x496e6f69u, 0x00000044u, 0x00030005u, 0x000000aeu, 0x00000078u, 0x00030005u,
0x000000b1u, 0x00000079u, 0x00040005u, 0x000000bbu, 0x50727249u, 0x00687375u,
0x00060006u, 0x000000bbu, 0x00000000u, 0x65636166u, 0x7a69735fu, 0x00000065u,
0x00060006u, 0x000000bbu, 0x00000001u, 0x5f6d756eu, 0x706d6173u, 0x0073656cu,
0x00040005u, 0x000000bdu, 0x75705f67u, 0x00006873u, 0x00030005u, 0x000000d0u,
0x0000006eu, 0x00040005u, 0x000000d1u, 0x61726170u, 0x0000006du, 0x00040005u,
0x000000d3u, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000d5u, 0x61726170u,
0x0000006du, 0x00040005u, 0x000000d7u, 0x61726170u, 0x0000006du, 0x00030005u,
0x000000dbu, 0x00000074u, 0x00030005u, 0x000000dcu, 0x00000062u, 0x00040005u,
0x000000ddu, 0x61726170u, 0x0000006du, 0x00040005u, 0x000000dfu, 0x61726170u,
0x0000006du, 0x00040005u, 0x000000e0u, 0x61726170u, 0x0000006du, 0x00040005u,
0x000000e4u, 0x6e756f63u, 0x00000074u, 0x00030005u, 0x000000f1u, 0x00636361u,
0x00030005u, 0x000000f2u, 0x00000069u, 0x00030005u, 0x000000fbu, 0x00003175u,
0x00030005u, 0x00000102u, 0x00003275u, 0x00030005u, 0x00000108u, 0x00000068u,
0x00040005u, 0x00000109u, 0x61726170u, 0x0000006du, 0x00040005u, 0x0000010bu,
0x61726170u, 0x0000006du, 0x00030005u, 0x0000010eu, 0x00000064u, 0x00040005u,
0x00000120u, 0x75635f75u, 0x00006562u, 0x00030005u, 0x0000012au, 0x00727269u,
0x00040005u, 0x00000133u, 0x72695f75u, 0x00000072u, 0x00040047u, 0x000000aau,
0x0000000bu, 0x0000001cu, 0x00030047u, 0x000000bbu, 0x00000002u, 0x00050048u,
0x000000bbu, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x000000bbu,
0x00000001u, 0x00000023u, 0x00000004u, 0x00040047u, 0x00000120u, 0x00000021u,
0x00000000u, 0x00040047u, 0x00000120u, 0x00000022u, 0x00000000u, 0x00030047u,
0x00000133u, 0x00000019u, 0x00040047u, 0x00000133u, 0x00000021u, 0x00000001u,
0x00040047u, 0x00000133u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u,
0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u,
0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u, 0x00000006u, 0x00030016u,
0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u, 0x00000008u, 0x00000003u,
0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u, 0x00000007u, 0x00000007u,
0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u, 0x00000009u, 0x00060021u,
0x00000012u, 0x00000002u, 0x00000011u, 0x00000011u, 0x00000011u, 0x00040020u,
0x00000018u, 0x00000007u, 0x00000008u, 0x00050021u, 0x00000019u, 0x00000009u,
0x00000018u, 0x00000018u, 0x0004002bu, 0x00000008u, 0x00000021u, 0x3f000000u,
0x0004002bu, 0x00000008u, 0x00000026u, 0x40000000u, 0x0004002bu, 0x00000008u,
0x00000028u, 0x3f800000u, 0x0004002bu, 0x00000008u, 0x00000034u, 0x00000000u,
0x0006002cu, 0x00000009u, 0x00000035u, 0x00000034u, 0x00000034u, 0x00000034u,
0x0004002bu, 0x00000008u, 0x00000044u, 0xbf800000u, 0x00020014u, 0x00000064u,
0x0004002bu, 0x00000006u, 0x00000065u, 0x00000000u, 0x0004002bu, 0x00000006u,
0x00000069u, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000073u, 0x00000002u,
0x0006002cu, 0x00000009u, 0x0000007bu, 0x00000028u, 0x00000034u, 0x00000034u,
0x0006002cu, 0x00000009u, 0x00000086u, 0x00000034u, 0x00000028u, 0x00000034u,
0x0006002cu, 0x00000009u, 0x00000088u, 0x00000034u, 0x00000034u, 0x00000028u,
0x0004002bu, 0x00000008u, 0x00000095u, 0x40c90fdbu, 0x00040017u, 0x000000a8u,
0x00000006u, 0x00000003u, 0x00040020u, 0x000000a9u, 0x00000001u, 0x000000a8u,
0x0004003bu, 0x000000a9u, 0x000000aau, 0x00000001u, 0x00040020u, 0x000000abu,
0x00000001u, 0x00000006u, 0x0004002bu, 0x00000006u, 0x000000b5u, 0x00000006u,
0x0004001eu, 0x000000bbu, 0x00000006u, 0x00000006u, 0x00040020u, 0x000000bcu,
0x00000009u, 0x000000bbu, 0x0004003bu, 0x000000bcu, 0x000000bdu, 0x00000009u,
0x00040015u, 0x000000beu, 0x00000020u, 0x00000001u, 0x0004002bu, 0x000000beu,
0x000000bfu, 0x00000000u, 0x00040020u, 0x000000c0u, 0x00000009u, 0x00000006u,
0x0004002bu, 0x000000beu, 0x000000e5u, 0x00000001u, 0x0004002bu, 0x00000006u,
0x000000efu, 0x00000200u, 0x0004002bu, 0x00000008u, 0x00000105u, 0x3f1e377au,
0x00090019u, 0x0000011du, 0x00000008u, 0x00000003u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x0000011eu, 0x0000011du,
0x00040020u, 0x0000011fu, 0x00000000u, 0x0000011eu, 0x0004003bu, 0x0000011fu,
0x00000120u, 0x00000000u, 0x00040017u, 0x00000123u, 0x00000008u, 0x00000004u,
0x0004002bu, 0x00000008u, 0x0000012cu, 0x40490fdbu, 0x00090019u, 0x00000131u,
0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u, 0x00000000u, 0x00000002u,
0x00000001u, 0x00040020u, 0x00000132u, 0x00000000u, 0x00000131u, 0x0004003bu,
0x00000132u, 0x00000133u, 0x00000000u, 0x00040017u, 0x0000013bu, 0x000000beu,
0x00000003u, 0x0004002bu, 0x00000006u, 0x00000142u, 0x00000010u, 0x0006002cu,
0x000000a8u, 0x00000143u, 0x00000142u, 0x00000142u, 0x00000069u, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000007u, 0x000000a7u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000aeu, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000b1u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000d0u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000d1u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000d3u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x000000d5u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000d7u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000000dbu, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000dcu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x000000ddu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000000dfu, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000e0u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000e4u, 0x00000007u, 0x0004003bu, 0x00000007u, 0x000000e9u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000000f1u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x000000f2u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x000000fbu, 0x00000007u,
0x0004003bu, 0x00000018u, 0x00000102u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000108u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x00000109u, 0x00000007u,
0x0004003bu, 0x00000018u, 0x0000010bu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x0000010eu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000012au, 0x00000007u,
0x00050041u, 0x000000abu, 0x000000acu, 0x000000aau, 0x00000073u, 0x0004003du,
0x00000006u, 0x000000adu, 0x000000acu, 0x0003003eu, 0x000000a7u, 0x000000adu,
0x00050041u, 0x000000abu, 0x000000afu, 0x000000aau, 0x00000065u, 0x0004003du,
0x00000006u, 0x000000b0u, 0x000000afu, 0x0003003eu, 0x000000aeu, 0x000000b0u,
0x00050041u, 0x000000abu, 0x000000b2u, 0x000000aau, 0x00000069u, 0x0004003du,
0x00000006u, 0x000000b3u, 0x000000b2u, 0x0003003eu, 0x000000b1u, 0x000000b3u,
0x0004003du, 0x00000006u, 0x000000b4u, 0x000000a7u, 0x000500aeu, 0x00000064u,
0x000000b6u, 0x000000b4u, 0x000000b5u, 0x000400a8u, 0x00000064u, 0x000000b7u,
0x000000b6u, 0x000300f7u, 0x000000b9u, 0x00000000u, 0x000400fau, 0x000000b7u,
0x000000b8u, 0x000000b9u, 0x000200f8u, 0x000000b8u, 0x0004003du, 0x00000006u,
0x000000bau, 0x000000aeu, 0x00050041u, 0x000000c0u, 0x000000c1u, 0x000000bdu,
0x000000bfu, 0x0004003du, 0x00000006u, 0x000000c2u, 0x000000c1u, 0x000500aeu,
0x00000064u, 0x000000c3u, 0x000000bau, 0x000000c2u, 0x000200f9u, 0x000000b9u,
0x000200f8u, 0x000000b9u, 0x000700f5u, 0x00000064u, 0x000000c4u, 0x000000b6u,
0x00000005u, 0x000000c3u, 0x000000b8u, 0x000400a8u, 0x00000064u, 0x000000c5u,
0x000000c4u, 0x000300f7u, 0x000000c7u, 0x00000000u, 0x000400fau, 0x000000c5u,
0x000000c6u, 0x000000c7u, 0x000200f8u, 0x000000c6u, 0x0004003du, 0x00000006u,
0x000000c8u, 0x000000b1u, 0x00050041u, 0x000000c0u, 0x000000c9u, 0x000000bdu,
0x000000bfu, 0x0004003du, 0x00000006u, 0x000000cau, 0x000000c9u, 0x000500aeu,
0x00000064u, 0x000000cbu, 0x000000c8u, 0x000000cau, 0x000200f9u, 0x000000c7u,
0x000200f8u, 0x000000c7u, 0x000700f5u, 0x00000064u, 0x000000ccu, 0x000000c4u,
0x000000b9u, 0x000000cbu, 0x000000c6u, 0x000300f7u, 0x000000ceu, 0x00000000u,
0x000400fau, 0x000000ccu, 0x000000cdu, 0x000000ceu, 0x000200f8u, 0x000000cdu,
0x000100fdu, 0x000200f8u, 0x000000ceu, 0x0004003du, 0x00000006u, 0x000000d2u,
0x000000a7u, 0x0003003eu, 0x000000d1u, 0x000000d2u, 0x0004003du, 0x00000006u,
0x000000d4u, 0x000000aeu, 0x0003003eu, 0x000000d3u, 0x000000d4u, 0x0004003du,
0x00000006u, 0x000000d6u, 0x000000b1u, 0x0003003eu, 0x000000d5u, 0x000000d6u,
0x00050041u, 0x000000c0u, 0x000000d8u, 0x000000bdu, 0x000000bfu, 0x0004003du,
0x00000006u, 0x000000d9u, 0x000000d8u, 0x0003003eu, 0x000000d7u, 0x000000d9u,
0x00080039u, 0x00000009u, 0x000000dau, 0x0000000fu, 0x000000d1u, 0x000000d3u,
0x000000d5u, 0x000000d7u, 0x0003003eu, 0x000000d0u, 0x000000dau, 0x0004003du,
0x00000009u, 0x000000deu, 0x000000d0u, 0x0003003eu, 0x000000ddu, 0x000000deu,
0x00070039u, 0x00000002u, 0x000000e1u, 0x00000016u, 0x000000ddu, 0x000000dfu,
0x000000e0u, 0x0004003du, 0x00000009u, 0x000000e2u, 0x000000dfu, 0x0003003eu,
0x000000dbu, 0x000000e2u, 0x0004003du, 0x00000009u, 0x000000e3u, 0x000000e0u,
0x0003003eu, 0x000000dcu, 0x000000e3u, 0x00050041u, 0x000000c0u, 0x000000e6u,
0x000000bdu, 0x000000e5u, 0x0004003du, 0x00000006u, 0x000000e7u, 0x000000e6u,
0x000500acu, 0x00000064u, 0x000000e8u, 0x000000e7u, 0x00000065u, 0x000300f7u,
0x000000ebu, 0x00000000u, 0x000400fau, 0x000000e8u, 0x000000eau, 0x000000eeu,
0x000200f8u, 0x000000eau, 0x00050041u, 0x000000c0u, 0x000000ecu, 0x000000bdu,
0x000000e5u, 0x0004003du, 0x00000006u, 0x000000edu, 0x000000ecu, 0x0003003eu,
0x000000e9u, 0x000000edu, 0x000200f9u, 0x000000ebu, 0x000200f8u, 0x000000eeu,
0x0003003eu, 0x000000e9u, 0x000000efu, 0x000200f9u, 0x000000ebu, 0x000200f8u,
0x000000ebu, 0x0004003du, 0x00000006u, 0x000000f0u, 0x000000e9u, 0x0003003eu,
0x000000e4u, 0x000000f0u, 0x0003003eu, 0x000000f1u, 0x00000035u, 0x0003003eu,
0x000000f2u, 0x00000065u, 0x000200f9u, 0x000000f3u, 0x000200f8u, 0x000000f3u,
0x000400f6u, 0x000000f5u, 0x000000f6u, 0x00000000u, 0x000200f9u, 0x000000f7u,
0x000200f8u, 0x000000f7u, 0x0004003du, 0x00000006u, 0x000000f8u, 0x000000f2u,
0x0004003du, 0x00000006u, 0x000000f9u, 0x000000e4u, 0x000500b0u, 0x00000064u,
0x000000fau, 0x000000f8u, 0x000000f9u, 0x000400fau, 0x000000fau, 0x000000f4u,
0x000000f5u, 0x000200f8u, 0x000000f4u, 0x0004003du, 0x00000006u, 0x000000fcu,
0x000000f2u, 0x00040070u, 0x00000008u, 0x000000fdu, 0x000000fcu, 0x00050081u,
0x00000008u, 0x000000feu, 0x000000fdu, 0x00000021u, 0x0004003du, 0x00000006u,
0x000000ffu, 0x000000e4u, 0x00040070u, 0x00000008u, 0x00000100u, 0x000000ffu,
0x00050088u, 0x00000008u, 0x00000101u, 0x000000feu, 0x00000100u, 0x0003003eu,
0x000000fbu, 0x00000101u, 0x0004003du, 0x00000006u, 0x00000103u, 0x000000f2u,
0x00040070u, 0x00000008u, 0x00000104u, 0x00000103u, 0x00050085u, 0x00000008u,
0x00000106u, 0x00000104u, 0x00000105u, 0x0006000cu, 0x00000008u, 0x00000107u,
0x00000001u, 0x0000000au, 0x00000106u, 0x0003003eu, 0x00000102u, 0x00000107u,
0x0004003du, 0x00000008u, 0x0000010au, 0x000000fbu, 0x0003003eu, 0x00000109u,
0x0000010au, 0x0004003du, 0x00000008u, 0x0000010cu, 0x00000102u, 0x0003003eu,
0x0000010bu, 0x0000010cu, 0x00060039u, 0x00000009u, 0x0000010du, 0x0000001cu,
0x00000109u, 0x0000010bu, 0x0003003eu, 0x00000108u, 0x0000010du, 0x0004003du,
0x00000009u, 0x0000010fu, 0x000000dbu, 0x00050041u, 0x00000018u, 0x00000110u,
0x00000108u, 0x00000065u, 0x0004003du, 0x00000008u, 0x00000111u, 0x00000110u,
0x0005008eu, 0x00000009u, 0x00000112u, 0x0000010fu, 0x00000111u, 0x0004003du,
0x00000009u, 0x00000113u, 0x000000dcu, 0x00050041u, 0x00000018u, 0x00000114u,
0x00000108u, 0x00000069u, 0x0004003du, 0x00000008u, 0x00000115u, 0x00000114u,
0x0005008eu, 0x00000009u, 0x00000116u, 0x00000113u, 0x00000115u, 0x00050081u,
0x00000009u, 0x00000117u, 0x00000112u, 0x00000116u, 0x0004003du, 0x00000009u,
0x00000118u, 0x000000d0u, 0x00050041u, 0x00000018u, 0x00000119u, 0x00000108u,
0x00000073u, 0x0004003du, 0x00000008u, 0x0000011au, 0x00000119u, 0x0005008eu,
0x00000009u, 0x0000011bu, 0x00000118u, 0x0000011au, 0x00050081u, 0x00000009u,
0x0000011cu, 0x00000117u, 0x0000011bu, 0x0003003eu, 0x0000010eu, 0x0000011cu,
0x0004003du, 0x0000011eu, 0x00000121u, 0x00000120u, 0x0004003du, 0x00000009u,
0x00000122u, 0x0000010eu, 0x00070058u, 0x00000123u, 0x00000124u, 0x00000121u,
0x00000122u, 0x00000002u, 0x00000034u, 0x0008004fu, 0x00000009u, 0x00000125u,
0x00000124u, 0x00000124u, 0x00000000u, 0x00000001u, 0x00000002u, 0x0004003du,
0x00000009u, 0x00000126u, 0x000000f1u, 0x00050081u, 0x00000009u, 0x00000127u,
0x00000126u, 0x00000125u, 0x0003003eu, 0x000000f1u, 0x00000127u, 0x000200f9u,
0x000000f6u, 0x000200f8u, 0x000000f6u, 0x0004003du, 0x00000006u, 0x00000128u,
0x000000f2u, 0x00050080u, 0x00000006u, 0x00000129u, 0x00000128u, 0x000000e5u,
0x0003003eu, 0x000000f2u, 0x00000129u, 0x000200f9u, 0x000000f3u, 0x000200f8u,
0x000000f5u, 0x0004003du, 0x00000009u, 0x0000012bu, 0x000000f1u, 0x0004003du,
0x00000006u, 0x0000012du, 0x000000e4u, 0x00040070u, 0x00000008u, 0x0000012eu,
0x0000012du, 0x00050088u, 0x00000008u, 0x0000012fu, 0x0000012cu, 0x0000012eu,
0x0005008eu, 0x00000009u, 0x00000130u, 0x0000012bu, 0x0000012fu, 0x0003003eu,
0x0000012au, 0x00000130u, 0x0004003du, 0x00000131u, 0x00000134u, 0x00000133u,
0x0004003du, 0x00000006u, 0x00000135u, 0x000000aeu, 0x0004007cu, 0x000000beu,
0x00000136u, 0x00000135u, 0x0004003du, 0x00000006u, 0x00000137u, 0x000000b1u,
0x0004007cu, 0x000000beu, 0x00000138u, 0x00000137u, 0x0004003du, 0x00000006u,
0x00000139u, 0x000000a7u, 0x0004007cu, 0x000000beu, 0x0000013au, 0x00000139u,
0x00060050u, 0x0000013bu, 0x0000013cu, 0x00000136u, 0x00000138u, 0x0000013au,
0x0004003du, 0x00000009u, 0x0000013du, 0x0000012au, 0x00050051u, 0x00000008u,
0x0000013eu, 0x0000013du, 0x00000000u, 0x00050051u, 0x00000008u, 0x0000013fu,
0x0000013du, 0x00000001u, 0x00050051u, 0x00000008u, 0x00000140u, 0x0000013du,
0x00000002u, 0x00070050u, 0x00000123u, 0x00000141u, 0x0000013eu, 0x0000013fu,
0x00000140u, 0x00000028u, 0x00040063u, 0x00000134u, 0x0000013cu, 0x00000141u,
0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u,
0x0000000au, 0x00030037u, 0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u,
0x0000000cu, 0x00030037u, 0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u,
0x0000000eu, 0x000200f8u, 0x00000010u, 0x0004003bu, 0x00000018u, 0x0000001eu,
0x00000007u, 0x0004003bu, 0x00000018u, 0x0000002au, 0x00000007u, 0x0004003bu,
0x00000011u, 0x00000033u, 0x00000007u, 0x0004003du, 0x00000006u, 0x0000001fu,
0x0000000cu, 0x00040070u, 0x00000008u, 0x00000020u, 0x0000001fu, 0x00050081u,
0x00000008u, 0x00000022u, 0x00000020u, 0x00000021u, 0x0004003du, 0x00000006u,
0x00000023u, 0x0000000eu, 0x00040070u, 0x00000008u, 0x00000024u, 0x00000023u,
0x00050088u, 0x00000008u, 0x00000025u, 0x00000022u, 0x00000024u, 0x00050085u,
0x00000008u, 0x00000027u, 0x00000025u, 0x00000026u, 0x00050083u, 0x00000008u,
0x00000029u, 0x00000027u, 0x00000028u, 0x0003003eu, 0x0000001eu, 0x00000029u,
0x0004003du, 0x00000006u, 0x0000002bu, 0x0000000du, 0x00040070u, 0x00000008u,
0x0000002cu, 0x0000002bu, 0x00050081u, 0x00000008u, 0x0000002du, 0x0000002cu,
0x00000021u, 0x0004003du, 0x00000006u, 0x0000002eu, 0x0000000eu, 0x00040070u,
0x00000008u, 0x0000002fu, 0x0000002eu, 0x00050088u, 0x00000008u, 0x00000030u,
0x0000002du, 0x0000002fu, 0x00050085u, 0x00000008u, 0x00000031u, 0x00000030u,
0x00000026u, 0x00050083u, 0x00000008u, 0x00000032u, 0x00000031u, 0x00000028u,
0x0003003eu, 0x0000002au, 0x00000032u, 0x0003003eu, 0x00000033u, 0x00000035u,
0x0004003du, 0x00000006u, 0x00000036u, 0x0000000bu, 0x000300f7u, 0x0000003du,
0x00000000u, 0x000d00fbu, 0x00000036u, 0x0000003cu, 0x00000000u, 0x00000037u,
0x00000001u, 0x00000038u, 0x00000002u, 0x00000039u, 0x00000003u, 0x0000003au,
0x00000004u, 0x0000003bu, 0x000200f8u, 0x0000003cu, 0x0004003du, 0x00000008u,
0x00000058u, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000059u, 0x00000058u,
0x0004003du, 0x00000008u, 0x0000005au, 0x0000002au, 0x0004007fu, 0x00000008u,
0x0000005bu, 0x0000005au, 0x00060050u, 0x00000009u, 0x0000005cu, 0x00000059u,
0x0000005bu, 0x00000044u, 0x0003003eu, 0x00000033u, 0x0000005cu, 0x000200f9u,
0x0000003du, 0x000200f8u, 0x00000037u, 0x0004003du, 0x00000008u, 0x0000003eu,
0x0000002au, 0x0004007fu, 0x00000008u, 0x0000003fu, 0x0000003eu, 0x0004003du,
0x00000008u, 0x00000040u, 0x0000001eu, 0x0004007fu, 0x00000008u, 0x00000041u,
0x00000040u, 0x00060050u, 0x00000009u, 0x00000042u, 0x00000028u, 0x0000003fu,
0x00000041u, 0x0003003eu, 0x00000033u, 0x00000042u, 0x000200f9u, 0x0000003du,
0x000200f8u, 0x00000038u, 0x0004003du, 0x00000008u, 0x00000045u, 0x0000002au,
0x0004007fu, 0x00000008u, 0x00000046u, 0x00000045u, 0x0004003du, 0x00000008u,
0x00000047u, 0x0000001eu, 0x00060050u, 0x00000009u, 0x00000048u, 0x00000044u,
0x00000046u, 0x00000047u, 0x0003003eu, 0x00000033u, 0x00000048u, 0x000200f9u,
0x0000003du, 0x000200f8u, 0x00000039u, 0x0004003du, 0x00000008u, 0x0000004au,
0x0000001eu, 0x0004003du, 0x00000008u, 0x0000004bu, 0x0000002au, 0x00060050u,
0x00000009u, 0x0000004cu, 0x0000004au, 0x00000028u, 0x0000004bu, 0x0003003eu,
0x00000033u, 0x0000004cu, 0x000200f9u, 0x0000003du, 0x000200f8u, 0x0000003au,
0x0004003du, 0x00000008u, 0x0000004eu, 0x0000001eu, 0x0004003du, 0x00000008u,
0x0000004fu, 0x0000002au, 0x0004007fu, 0x00000008u, 0x00000050u, 0x0000004fu,
0x00060050u, 0x00000009u, 0x00000051u, 0x0000004eu, 0x00000044u, 0x00000050u,
0x0003003eu, 0x00000033u, 0x00000051u, 0x000200f9u, 0x0000003du, 0x000200f8u,
0x0000003bu, 0x0004003du, 0x00000008u, 0x00000053u, 0x0000001eu, 0x0004003du,
0x00000008u, 0x00000054u, 0x0000002au, 0x0004007fu, 0x00000008u, 0x00000055u,
0x00000054u, 0x00060050u, 0x00000009u, 0x00000056u, 0x00000053u, 0x00000055u,
0x00000028u, 0x0003003eu, 0x00000033u, 0x00000056u, 0x000200f9u, 0x0000003du,
0x000200f8u, 0x0000003du, 0x0004003du, 0x00000009u, 0x0000005fu, 0x00000033u,
0x0006000cu, 0x00000009u, 0x00000060u, 0x00000001u, 0x00000045u, 0x0000005fu,
0x000200feu, 0x00000060u, 0x00010038u, 0x00050036u, 0x00000002u, 0x00000016u,
0x00000000u, 0x00000012u, 0x00030037u, 0x00000011u, 0x00000013u, 0x00030037u,
0x00000011u, 0x00000014u, 0x00030037u, 0x00000011u, 0x00000015u, 0x000200f8u,
0x00000017u, 0x0004003bu, 0x00000011u, 0x00000063u, 0x00000007u, 0x0003003eu,
0x00000063u, 0x00000035u, 0x00050041u, 0x00000018u, 0x00000066u, 0x00000013u,
0x00000065u, 0x0004003du, 0x00000008u, 0x00000067u, 0x00000066u, 0x0006000cu,
0x00000008u, 0x00000068u, 0x00000001u, 0x00000004u, 0x00000067u, 0x00050041u,
0x00000018u, 0x0000006au, 0x00000013u, 0x00000069u, 0x0004003du, 0x00000008u,
0x0000006bu, 0x0000006au, 0x0006000cu, 0x00000008u, 0x0000006cu, 0x00000001u,
0x00000004u, 0x0000006bu, 0x000500b8u, 0x00000064u, 0x0000006du, 0x00000068u,
0x0000006cu, 0x000300f7u, 0x0000006fu, 0x00000000u, 0x000400fau, 0x0000006du,
0x0000006eu, 0x0000006fu, 0x000200f8u, 0x0000006eu, 0x00050041u, 0x00000018u,
0x00000070u, 0x00000013u, 0x00000065u, 0x0004003du, 0x00000008u, 0x00000071u,
0x00000070u, 0x0006000cu, 0x00000008u, 0x00000072u, 0x00000001u, 0x00000004u,
0x00000071u, 0x00050041u, 0x00000018u, 0x00000074u, 0x00000013u, 0x00000073u,
0x0004003du, 0x00000008u, 0x00000075u, 0x00000074u, 0x0006000cu, 0x00000008u,
0x00000076u, 0x00000001u, 0x00000004u, 0x00000075u, 0x000500b8u, 0x00000064u,
0x00000077u, 0x00000072u, 0x00000076u, 0x000200f9u, 0x0000006fu, 0x000200f8u,
0x0000006fu, 0x000700f5u, 0x00000064u, 0x00000078u, 0x0000006du, 0x00000017u,
0x00000077u, 0x0000006eu, 0x000300f7u, 0x0000007au, 0x00000000u, 0x000400fau,
0x00000078u, 0x00000079u, 0x0000007cu, 0x000200f8u, 0x00000079u, 0x0003003eu,
0x00000063u, 0x0000007bu, 0x000200f9u, 0x0000007au, 0x000200f8u, 0x0000007cu,
0x00050041u, 0x00000018u, 0x0000007du, 0x00000013u, 0x00000069u, 0x0004003du,
0x00000008u, 0x0000007eu, 0x0000007du, 0x0006000cu, 0x00000008u, 0x0000007fu,
0x00000001u, 0x00000004u, 0x0000007eu, 0x00050041u, 0x00000018u, 0x00000080u,
0x00000013u, 0x00000073u, 0x0004003du, 0x00000008u, 0x00000081u, 0x00000080u,
0x0006000cu, 0x00000008u, 0x00000082u, 0x00000001u, 0x00000004u, 0x00000081u,
0x000500b8u, 0x00000064u, 0x00000083u, 0x0000007fu, 0x00000082u, 0x000300f7u,
0x00000085u, 0x00000000u, 0x000400fau, 0x00000083u, 0x00000084u, 0x00000087u,
0x000200f8u, 0x00000084u, 0x0003003eu, 0x00000063u, 0x00000086u, 0x000200f9u,
0x00000085u, 0x000200f8u, 0x00000087u, 0x0003003eu, 0x00000063u, 0x00000088u,
0x000200f9u, 0x00000085u, 0x000200f8u, 0x00000085u, 0x000200f9u, 0x0000007au,
0x000200f8u, 0x0000007au, 0x0004003du, 0x00000009u, 0x00000089u, 0x00000013u,
0x0004003du, 0x00000009u, 0x0000008au, 0x00000063u, 0x0007000cu, 0x00000009u,
0x0000008bu, 0x00000001u, 0x00000044u, 0x00000089u, 0x0000008au, 0x0006000cu,
0x00000009u, 0x0000008cu, 0x00000001u, 0x00000045u, 0x0000008bu, 0x0003003eu,
0x00000014u, 0x0000008cu, 0x0004003du, 0x00000009u, 0x0000008du, 0x00000013u,
0x0004003du, 0x00000009u, 0x0000008eu, 0x00000014u, 0x0007000cu, 0x00000009u,
0x0000008fu, 0x00000001u, 0x00000044u, 0x0000008du, 0x0000008eu, 0x0003003eu,
0x00000015u, 0x0000008fu, 0x000100fdu, 0x00010038u, 0x00050036u, 0x00000009u,
0x0000001cu, 0x00000000u, 0x00000019u, 0x00030037u, 0x00000018u, 0x0000001au,
0x00030037u, 0x00000018u, 0x0000001bu, 0x000200f8u, 0x0000001du, 0x0004003bu,
0x00000018u, 0x00000090u, 0x00000007u, 0x0004003bu, 0x00000018u, 0x00000094u,
0x00000007u, 0x0004003du, 0x00000008u, 0x00000091u, 0x0000001au, 0x0007000cu,
0x00000008u, 0x00000092u, 0x00000001u, 0x00000028u, 0x00000091u, 0x00000034u,
0x0006000cu, 0x00000008u, 0x00000093u, 0x00000001u, 0x0000001fu, 0x00000092u,
0x0003003eu, 0x00000090u, 0x00000093u, 0x0004003du, 0x00000008u, 0x00000096u,
0x0000001bu, 0x00050085u, 0x00000008u, 0x00000097u, 0x00000095u, 0x00000096u,
0x0003003eu, 0x00000094u, 0x00000097u, 0x0004003du, 0x00000008u, 0x00000098u,
0x00000090u, 0x0004003du, 0x00000008u, 0x00000099u, 0x00000094u, 0x0006000cu,
0x00000008u, 0x0000009au, 0x00000001u, 0x0000000eu, 0x00000099u, 0x00050085u,
0x00000008u, 0x0000009bu, 0x00000098u, 0x0000009au, 0x0004003du, 0x00000008u,
0x0000009cu, 0x00000090u, 0x0004003du, 0x00000008u, 0x0000009du, 0x00000094u,
0x0006000cu, 0x00000008u, 0x0000009eu, 0x00000001u, 0x0000000du, 0x0000009du,
0x00050085u, 0x00000008u, 0x0000009fu, 0x0000009cu, 0x0000009eu, 0x0004003du,
0x00000008u, 0x000000a0u, 0x0000001au, 0x00050083u, 0x00000008u, 0x000000a1u,
0x00000028u, 0x000000a0u, 0x0007000cu, 0x00000008u, 0x000000a2u, 0x00000001u,
0x00000028u, 0x000000a1u, 0x00000034u, 0x0006000cu, 0x00000008u, 0x000000a3u,
0x00000001u, 0x0000001fu, 0x000000a2u, 0x00060050u, 0x00000009u, 0x000000a4u,
0x0000009bu, 0x0000009fu, 0x000000a3u, 0x000200feu, 0x000000a4u, 0x00010038u,
};
+114
View File
@@ -0,0 +1,114 @@
// prefilter.comp — P4-05: specular prefiltered cubemap generation.
//
// One invocation per prefiltered texel of ONE mip level (face =
// gl_GlobalInvocationID.z, dispatch ((edge+15)/16, (edge+15)/16, 6) with
// ceil division where edge is the mip edge; mip/roughness come from push
// importance-samples the source HDR cubemap (1024 samples, Epic's
// split-sum fit: roughness^2 alpha, geometry-weighted average), writing
// RGBA32F (alpha 1) into one mip layer of the prefilter cube (set 0
// binding 1, rgba32f storage image2DArray bound to a per-mip 2D-array
// view — one descriptor per mip).
//
// Face/dir math mirrors SkyboxFaceDir() term for term (+Y up, layer
// order +X -X +Y -Y +Z -Z). Hemisphere/basis math mirrors IblBasis in
// skybox_ibl.hpp. Roughness mapping mirrors PrefilterMipRoughness:
// rough = mip / (mip_count - 1) (mip 0 = mirror, last = fully rough).
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into prefilter_spv.inc (both shader dirs).
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout(set = 0, binding = 0) uniform samplerCube u_cube;
layout(set = 0, binding = 1, rgba32f) uniform writeonly image2DArray u_pref;
layout(push_constant, scalar) uniform PrefPush {
uint mip_edge; // this mip's edge in texels (dispatch x/y cover it)
uint mip_index; // this mip level (0 = base)
uint mip_count; // total mips in the chain
uint num_samples; // GGX samples (spec default 1024)
} g_push;
vec3 face_dir(uint face, uint x, uint y, uint size) {
float u = (float(x) + 0.5) / float(size) * 2.0 - 1.0;
float v = (float(y) + 0.5) / float(size) * 2.0 - 1.0;
vec3 d = vec3(0.0, 0.0, 0.0);
switch (face) {
case 0: d = vec3(1.0, -v, -u); break; // +X
case 1: d = vec3(-1.0, -v, u); break; // -X
case 2: d = vec3(u, 1.0, v); break; // +Y
case 3: d = vec3(u, -1.0, -v); break; // -Y
case 4: d = vec3(u, -v, 1.0); break; // +Z
default: d = vec3(-u, -v, -1.0); break; // -Z
}
return normalize(d);
}
void basis(vec3 n, out vec3 t, out vec3 b) {
vec3 a = vec3(0.0);
if (abs(n.x) < abs(n.y) && abs(n.x) < abs(n.z)) {
a = vec3(1.0, 0.0, 0.0);
} else if (abs(n.y) < abs(n.z)) {
a = vec3(0.0, 1.0, 0.0);
} else {
a = vec3(0.0, 0.0, 1.0);
}
t = normalize(cross(n, a));
b = cross(n, t);
}
uint radical_inverse_vdc(uint bits) {
bits = (bits << 16) | (bits >> 16);
bits = ((bits & 0x55555555u) << 1) | ((bits & 0xAAAAAAAAu) >> 1);
bits = ((bits & 0x33333333u) << 2) | ((bits & 0xCCCCCCCCu) >> 2);
bits = ((bits & 0x0F0F0F0Fu) << 4) | ((bits & 0xF0F0F0F0u) >> 4);
bits = ((bits & 0x00FF00FFu) << 8) | ((bits & 0xFF00FF00u) >> 8);
return bits;
}
vec3 importance_sample_ggx(vec2 xi, float roughness) {
float a = roughness * roughness;
float a2 = a * a;
float denom = 1.0 + (a2 - 1.0) * xi.y;
float cos_theta = denom > 1e-7 ? sqrt(max(1.0 - xi.y, 0.0) / denom) : 1.0;
float phi = 6.283185307179586 * xi.x;
float sin_theta = sqrt(max(1.0 - cos_theta * cos_theta, 0.0));
return vec3(sin_theta * cos(phi), sin_theta * sin(phi), cos_theta);
}
void main() {
uint face = gl_GlobalInvocationID.z;
uint x = gl_GlobalInvocationID.x;
uint y = gl_GlobalInvocationID.y;
if (face >= 6u || x >= g_push.mip_edge || y >= g_push.mip_edge) {
return;
}
vec3 n = face_dir(face, x, y, g_push.mip_edge);
vec3 v = n; // prefilter integrates the normal-direction lobe (R = N)
float rough = g_push.mip_count > 1u
? float(g_push.mip_index) / float(g_push.mip_count - 1u)
: 0.0;
rough = clamp(rough, 0.0, 1.0);
vec3 t;
vec3 b;
basis(n, t, b);
uint count = g_push.num_samples > 0u ? g_push.num_samples : 1024u;
vec3 acc = vec3(0.0);
float weight = 0.0;
for (uint i = 0u; i < count; ++i) {
float u = float(i) / float(count);
float vv = float(radical_inverse_vdc(i)) * 2.3283064365386963e-10;
vec3 h_tan = importance_sample_ggx(vec2(u, vv), rough);
vec3 h = t * h_tan.x + b * h_tan.y + n * h_tan.z;
vec3 l = normalize(2.0 * dot(v, h) * h - v);
float n_dot_l = max(dot(n, l), 0.0);
if (n_dot_l > 0.0) {
acc += texture(u_cube, l).rgb * n_dot_l;
weight += n_dot_l;
}
}
vec3 pref = weight > 1e-7 ? acc / weight : vec3(0.0);
imageStore(u_pref, ivec3(int(x), int(y), int(face)), vec4(pref, 1.0));
}
+446
View File
@@ -0,0 +1,446 @@
// prefilter.spv — 2625 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S comp -o prefilter.spv prefilter.comp
// then: python3 native/renderer/shaders/embed_spv.py prefilter.spv prefilter_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kPrefilterSpvWords = 2625u;
inline constexpr std::uint32_t kPrefilterSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x000001d0u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000005u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x00000102u, 0x00000115u, 0x000001a2u,
0x000001bfu, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000010u, 0x00000010u,
0x00000001u, 0x00030003u, 0x00000002u, 0x000001ccu, 0x00080004u, 0x455f4c47u,
0x735f5458u, 0x616c6163u, 0x6c625f72u, 0x5f6b636fu, 0x6f79616cu, 0x00007475u,
0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00080005u, 0x0000000fu,
0x65636166u, 0x7269645fu, 0x3b317528u, 0x753b3175u, 0x31753b31u, 0x0000003bu,
0x00040005u, 0x0000000bu, 0x65636166u, 0x00000000u, 0x00030005u, 0x0000000cu,
0x00000078u, 0x00030005u, 0x0000000du, 0x00000079u, 0x00040005u, 0x0000000eu,
0x657a6973u, 0x00000000u, 0x00070005u, 0x00000016u, 0x69736162u, 0x66762873u,
0x66763b33u, 0x66763b33u, 0x00003b33u, 0x00030005u, 0x00000013u, 0x0000006eu,
0x00030005u, 0x00000014u, 0x00000074u, 0x00030005u, 0x00000015u, 0x00000062u,
0x00080005u, 0x0000001au, 0x69646172u, 0x5f6c6163u, 0x65766e69u, 0x5f657372u,
0x28636476u, 0x003b3175u, 0x00040005u, 0x00000019u, 0x73746962u, 0x00000000u,
0x000a0005u, 0x00000022u, 0x6f706d69u, 0x6e617472u, 0x735f6563u, 0x6c706d61u,
0x67675f65u, 0x66762878u, 0x31663b32u, 0x0000003bu, 0x00030005u, 0x00000020u,
0x00006978u, 0x00050005u, 0x00000021u, 0x67756f72u, 0x73656e68u, 0x00000073u,
0x00030005u, 0x00000024u, 0x00000075u, 0x00030005u, 0x00000030u, 0x00000076u,
0x00030005u, 0x00000039u, 0x00000064u, 0x00030005u, 0x00000069u, 0x00000061u,
0x00030005u, 0x000000c8u, 0x00000061u, 0x00030005u, 0x000000ccu, 0x00003261u,
0x00040005u, 0x000000d0u, 0x6f6e6564u, 0x0000006du, 0x00050005u, 0x000000d7u,
0x5f736f63u, 0x74656874u, 0x00000061u, 0x00030005u, 0x000000e7u, 0x00696870u,
0x00050005u, 0x000000ecu, 0x5f6e6973u, 0x74656874u, 0x00000061u, 0x00040005u,
0x000000ffu, 0x65636166u, 0x00000000u, 0x00080005u, 0x00000102u, 0x475f6c67u,
0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00030005u,
0x00000106u, 0x00000078u, 0x00030005u, 0x00000109u, 0x00000079u, 0x00050005u,
0x00000113u, 0x66657250u, 0x68737550u, 0x00000000u, 0x00060006u, 0x00000113u,
0x00000000u, 0x5f70696du, 0x65676465u, 0x00000000u, 0x00060006u, 0x00000113u,
0x00000001u, 0x5f70696du, 0x65646e69u, 0x00000078u, 0x00060006u, 0x00000113u,
0x00000002u, 0x5f70696du, 0x6e756f63u, 0x00000074u, 0x00060006u, 0x00000113u,
0x00000003u, 0x5f6d756eu, 0x706d6173u, 0x0073656cu, 0x00040005u, 0x00000115u,
0x75705f67u, 0x00006873u, 0x00030005u, 0x00000127u, 0x0000006eu, 0x00040005u,
0x00000128u, 0x61726170u, 0x0000006du, 0x00040005u, 0x0000012au, 0x61726170u,
0x0000006du, 0x00040005u, 0x0000012cu, 0x61726170u, 0x0000006du, 0x00040005u,
0x0000012eu, 0x61726170u, 0x0000006du, 0x00030005u, 0x00000132u, 0x00000076u,
0x00040005u, 0x00000134u, 0x67756f72u, 0x00000068u, 0x00030005u, 0x00000147u,
0x00000074u, 0x00030005u, 0x00000148u, 0x00000062u, 0x00040005u, 0x00000149u,
0x61726170u, 0x0000006du, 0x00040005u, 0x0000014bu, 0x61726170u, 0x0000006du,
0x00040005u, 0x0000014cu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000150u,
0x6e756f63u, 0x00000074u, 0x00030005u, 0x0000015du, 0x00636361u, 0x00040005u,
0x0000015eu, 0x67696577u, 0x00007468u, 0x00030005u, 0x0000015fu, 0x00000069u,
0x00030005u, 0x00000168u, 0x00000075u, 0x00030005u, 0x0000016eu, 0x00007676u,
0x00040005u, 0x0000016fu, 0x61726170u, 0x0000006du, 0x00040005u, 0x00000175u,
0x61745f68u, 0x0000006eu, 0x00040005u, 0x00000179u, 0x61726170u, 0x0000006du,
0x00040005u, 0x0000017au, 0x61726170u, 0x0000006du, 0x00030005u, 0x0000017du,
0x00000068u, 0x00030005u, 0x0000018cu, 0x0000006cu, 0x00040005u, 0x00000196u,
0x6f645f6eu, 0x006c5f74u, 0x00040005u, 0x000001a2u, 0x75635f75u, 0x00006562u,
0x00040005u, 0x000001b1u, 0x66657270u, 0x00000000u, 0x00040005u, 0x000001bfu,
0x72705f75u, 0x00006665u, 0x00040047u, 0x00000102u, 0x0000000bu, 0x0000001cu,
0x00030047u, 0x00000113u, 0x00000002u, 0x00050048u, 0x00000113u, 0x00000000u,
0x00000023u, 0x00000000u, 0x00050048u, 0x00000113u, 0x00000001u, 0x00000023u,
0x00000004u, 0x00050048u, 0x00000113u, 0x00000002u, 0x00000023u, 0x00000008u,
0x00050048u, 0x00000113u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00040047u,
0x000001a2u, 0x00000021u, 0x00000000u, 0x00040047u, 0x000001a2u, 0x00000022u,
0x00000000u, 0x00030047u, 0x000001bfu, 0x00000019u, 0x00040047u, 0x000001bfu,
0x00000021u, 0x00000001u, 0x00040047u, 0x000001bfu, 0x00000022u, 0x00000000u,
0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u,
0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u,
0x00000006u, 0x00030016u, 0x00000008u, 0x00000020u, 0x00040017u, 0x00000009u,
0x00000008u, 0x00000003u, 0x00070021u, 0x0000000au, 0x00000009u, 0x00000007u,
0x00000007u, 0x00000007u, 0x00000007u, 0x00040020u, 0x00000011u, 0x00000007u,
0x00000009u, 0x00060021u, 0x00000012u, 0x00000002u, 0x00000011u, 0x00000011u,
0x00000011u, 0x00040021u, 0x00000018u, 0x00000006u, 0x00000007u, 0x00040017u,
0x0000001cu, 0x00000008u, 0x00000002u, 0x00040020u, 0x0000001du, 0x00000007u,
0x0000001cu, 0x00040020u, 0x0000001eu, 0x00000007u, 0x00000008u, 0x00050021u,
0x0000001fu, 0x00000009u, 0x0000001du, 0x0000001eu, 0x0004002bu, 0x00000008u,
0x00000027u, 0x3f000000u, 0x0004002bu, 0x00000008u, 0x0000002cu, 0x40000000u,
0x0004002bu, 0x00000008u, 0x0000002eu, 0x3f800000u, 0x0004002bu, 0x00000008u,
0x0000003au, 0x00000000u, 0x0006002cu, 0x00000009u, 0x0000003bu, 0x0000003au,
0x0000003au, 0x0000003au, 0x0004002bu, 0x00000008u, 0x0000004au, 0xbf800000u,
0x00020014u, 0x0000006au, 0x0004002bu, 0x00000006u, 0x0000006bu, 0x00000000u,
0x0004002bu, 0x00000006u, 0x0000006fu, 0x00000001u, 0x0004002bu, 0x00000006u,
0x00000079u, 0x00000002u, 0x0006002cu, 0x00000009u, 0x00000081u, 0x0000002eu,
0x0000003au, 0x0000003au, 0x0006002cu, 0x00000009u, 0x0000008cu, 0x0000003au,
0x0000002eu, 0x0000003au, 0x0006002cu, 0x00000009u, 0x0000008eu, 0x0000003au,
0x0000003au, 0x0000002eu, 0x00040015u, 0x00000097u, 0x00000020u, 0x00000001u,
0x0004002bu, 0x00000097u, 0x00000098u, 0x00000010u, 0x0004002bu, 0x00000006u,
0x0000009eu, 0x55555555u, 0x0004002bu, 0x00000097u, 0x000000a0u, 0x00000001u,
0x0004002bu, 0x00000006u, 0x000000a3u, 0xaaaaaaaau, 0x0004002bu, 0x00000006u,
0x000000a8u, 0x33333333u, 0x0004002bu, 0x00000097u, 0x000000aau, 0x00000002u,
0x0004002bu, 0x00000006u, 0x000000adu, 0xccccccccu, 0x0004002bu, 0x00000006u,
0x000000b2u, 0x0f0f0f0fu, 0x0004002bu, 0x00000097u, 0x000000b4u, 0x00000004u,
0x0004002bu, 0x00000006u, 0x000000b7u, 0xf0f0f0f0u, 0x0004002bu, 0x00000006u,
0x000000bcu, 0x00ff00ffu, 0x0004002bu, 0x00000097u, 0x000000beu, 0x00000008u,
0x0004002bu, 0x00000006u, 0x000000c1u, 0xff00ff00u, 0x0004002bu, 0x00000008u,
0x000000d9u, 0x33d6bf95u, 0x0004002bu, 0x00000008u, 0x000000e8u, 0x40c90fdbu,
0x00040017u, 0x00000100u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000101u,
0x00000001u, 0x00000100u, 0x0004003bu, 0x00000101u, 0x00000102u, 0x00000001u,
0x00040020u, 0x00000103u, 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000006u,
0x0000010du, 0x00000006u, 0x0006001eu, 0x00000113u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00040020u, 0x00000114u, 0x00000009u, 0x00000113u,
0x0004003bu, 0x00000114u, 0x00000115u, 0x00000009u, 0x0004002bu, 0x00000097u,
0x00000116u, 0x00000000u, 0x00040020u, 0x00000117u, 0x00000009u, 0x00000006u,
0x0004002bu, 0x00000097u, 0x00000151u, 0x00000003u, 0x0004002bu, 0x00000006u,
0x0000015bu, 0x00000400u, 0x0004002bu, 0x00000008u, 0x00000173u, 0x2f800000u,
0x00090019u, 0x0000019fu, 0x00000008u, 0x00000003u, 0x00000000u, 0x00000000u,
0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x000001a0u, 0x0000019fu,
0x00040020u, 0x000001a1u, 0x00000000u, 0x000001a0u, 0x0004003bu, 0x000001a1u,
0x000001a2u, 0x00000000u, 0x00040017u, 0x000001a5u, 0x00000008u, 0x00000004u,
0x00090019u, 0x000001bdu, 0x00000008u, 0x00000001u, 0x00000000u, 0x00000001u,
0x00000000u, 0x00000002u, 0x00000001u, 0x00040020u, 0x000001beu, 0x00000000u,
0x000001bdu, 0x0004003bu, 0x000001beu, 0x000001bfu, 0x00000000u, 0x00040017u,
0x000001c7u, 0x00000097u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x000001ceu,
0x00000010u, 0x0006002cu, 0x00000100u, 0x000001cfu, 0x000001ceu, 0x000001ceu,
0x0000006fu, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u,
0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000007u, 0x000000ffu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000106u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000109u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000127u, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000128u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000012au, 0x00000007u, 0x0004003bu, 0x00000007u, 0x0000012cu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x0000012eu, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000132u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x00000134u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x00000138u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000147u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000148u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x00000149u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x0000014bu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000014cu, 0x00000007u,
0x0004003bu, 0x00000007u, 0x00000150u, 0x00000007u, 0x0004003bu, 0x00000007u,
0x00000155u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000015du, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x0000015eu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000015fu, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x00000168u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x0000016eu, 0x00000007u, 0x0004003bu, 0x00000007u,
0x0000016fu, 0x00000007u, 0x0004003bu, 0x00000011u, 0x00000175u, 0x00000007u,
0x0004003bu, 0x0000001du, 0x00000179u, 0x00000007u, 0x0004003bu, 0x0000001eu,
0x0000017au, 0x00000007u, 0x0004003bu, 0x00000011u, 0x0000017du, 0x00000007u,
0x0004003bu, 0x00000011u, 0x0000018cu, 0x00000007u, 0x0004003bu, 0x0000001eu,
0x00000196u, 0x00000007u, 0x0004003bu, 0x00000011u, 0x000001b1u, 0x00000007u,
0x0004003bu, 0x00000011u, 0x000001b4u, 0x00000007u, 0x00050041u, 0x00000103u,
0x00000104u, 0x00000102u, 0x00000079u, 0x0004003du, 0x00000006u, 0x00000105u,
0x00000104u, 0x0003003eu, 0x000000ffu, 0x00000105u, 0x00050041u, 0x00000103u,
0x00000107u, 0x00000102u, 0x0000006bu, 0x0004003du, 0x00000006u, 0x00000108u,
0x00000107u, 0x0003003eu, 0x00000106u, 0x00000108u, 0x00050041u, 0x00000103u,
0x0000010au, 0x00000102u, 0x0000006fu, 0x0004003du, 0x00000006u, 0x0000010bu,
0x0000010au, 0x0003003eu, 0x00000109u, 0x0000010bu, 0x0004003du, 0x00000006u,
0x0000010cu, 0x000000ffu, 0x000500aeu, 0x0000006au, 0x0000010eu, 0x0000010cu,
0x0000010du, 0x000400a8u, 0x0000006au, 0x0000010fu, 0x0000010eu, 0x000300f7u,
0x00000111u, 0x00000000u, 0x000400fau, 0x0000010fu, 0x00000110u, 0x00000111u,
0x000200f8u, 0x00000110u, 0x0004003du, 0x00000006u, 0x00000112u, 0x00000106u,
0x00050041u, 0x00000117u, 0x00000118u, 0x00000115u, 0x00000116u, 0x0004003du,
0x00000006u, 0x00000119u, 0x00000118u, 0x000500aeu, 0x0000006au, 0x0000011au,
0x00000112u, 0x00000119u, 0x000200f9u, 0x00000111u, 0x000200f8u, 0x00000111u,
0x000700f5u, 0x0000006au, 0x0000011bu, 0x0000010eu, 0x00000005u, 0x0000011au,
0x00000110u, 0x000400a8u, 0x0000006au, 0x0000011cu, 0x0000011bu, 0x000300f7u,
0x0000011eu, 0x00000000u, 0x000400fau, 0x0000011cu, 0x0000011du, 0x0000011eu,
0x000200f8u, 0x0000011du, 0x0004003du, 0x00000006u, 0x0000011fu, 0x00000109u,
0x00050041u, 0x00000117u, 0x00000120u, 0x00000115u, 0x00000116u, 0x0004003du,
0x00000006u, 0x00000121u, 0x00000120u, 0x000500aeu, 0x0000006au, 0x00000122u,
0x0000011fu, 0x00000121u, 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x0000011eu,
0x000700f5u, 0x0000006au, 0x00000123u, 0x0000011bu, 0x00000111u, 0x00000122u,
0x0000011du, 0x000300f7u, 0x00000125u, 0x00000000u, 0x000400fau, 0x00000123u,
0x00000124u, 0x00000125u, 0x000200f8u, 0x00000124u, 0x000100fdu, 0x000200f8u,
0x00000125u, 0x0004003du, 0x00000006u, 0x00000129u, 0x000000ffu, 0x0003003eu,
0x00000128u, 0x00000129u, 0x0004003du, 0x00000006u, 0x0000012bu, 0x00000106u,
0x0003003eu, 0x0000012au, 0x0000012bu, 0x0004003du, 0x00000006u, 0x0000012du,
0x00000109u, 0x0003003eu, 0x0000012cu, 0x0000012du, 0x00050041u, 0x00000117u,
0x0000012fu, 0x00000115u, 0x00000116u, 0x0004003du, 0x00000006u, 0x00000130u,
0x0000012fu, 0x0003003eu, 0x0000012eu, 0x00000130u, 0x00080039u, 0x00000009u,
0x00000131u, 0x0000000fu, 0x00000128u, 0x0000012au, 0x0000012cu, 0x0000012eu,
0x0003003eu, 0x00000127u, 0x00000131u, 0x0004003du, 0x00000009u, 0x00000133u,
0x00000127u, 0x0003003eu, 0x00000132u, 0x00000133u, 0x00050041u, 0x00000117u,
0x00000135u, 0x00000115u, 0x000000aau, 0x0004003du, 0x00000006u, 0x00000136u,
0x00000135u, 0x000500acu, 0x0000006au, 0x00000137u, 0x00000136u, 0x0000006fu,
0x000300f7u, 0x0000013au, 0x00000000u, 0x000400fau, 0x00000137u, 0x00000139u,
0x00000143u, 0x000200f8u, 0x00000139u, 0x00050041u, 0x00000117u, 0x0000013bu,
0x00000115u, 0x000000a0u, 0x0004003du, 0x00000006u, 0x0000013cu, 0x0000013bu,
0x00040070u, 0x00000008u, 0x0000013du, 0x0000013cu, 0x00050041u, 0x00000117u,
0x0000013eu, 0x00000115u, 0x000000aau, 0x0004003du, 0x00000006u, 0x0000013fu,
0x0000013eu, 0x00050082u, 0x00000006u, 0x00000140u, 0x0000013fu, 0x0000006fu,
0x00040070u, 0x00000008u, 0x00000141u, 0x00000140u, 0x00050088u, 0x00000008u,
0x00000142u, 0x0000013du, 0x00000141u, 0x0003003eu, 0x00000138u, 0x00000142u,
0x000200f9u, 0x0000013au, 0x000200f8u, 0x00000143u, 0x0003003eu, 0x00000138u,
0x0000003au, 0x000200f9u, 0x0000013au, 0x000200f8u, 0x0000013au, 0x0004003du,
0x00000008u, 0x00000144u, 0x00000138u, 0x0003003eu, 0x00000134u, 0x00000144u,
0x0004003du, 0x00000008u, 0x00000145u, 0x00000134u, 0x0008000cu, 0x00000008u,
0x00000146u, 0x00000001u, 0x0000002bu, 0x00000145u, 0x0000003au, 0x0000002eu,
0x0003003eu, 0x00000134u, 0x00000146u, 0x0004003du, 0x00000009u, 0x0000014au,
0x00000127u, 0x0003003eu, 0x00000149u, 0x0000014au, 0x00070039u, 0x00000002u,
0x0000014du, 0x00000016u, 0x00000149u, 0x0000014bu, 0x0000014cu, 0x0004003du,
0x00000009u, 0x0000014eu, 0x0000014bu, 0x0003003eu, 0x00000147u, 0x0000014eu,
0x0004003du, 0x00000009u, 0x0000014fu, 0x0000014cu, 0x0003003eu, 0x00000148u,
0x0000014fu, 0x00050041u, 0x00000117u, 0x00000152u, 0x00000115u, 0x00000151u,
0x0004003du, 0x00000006u, 0x00000153u, 0x00000152u, 0x000500acu, 0x0000006au,
0x00000154u, 0x00000153u, 0x0000006bu, 0x000300f7u, 0x00000157u, 0x00000000u,
0x000400fau, 0x00000154u, 0x00000156u, 0x0000015au, 0x000200f8u, 0x00000156u,
0x00050041u, 0x00000117u, 0x00000158u, 0x00000115u, 0x00000151u, 0x0004003du,
0x00000006u, 0x00000159u, 0x00000158u, 0x0003003eu, 0x00000155u, 0x00000159u,
0x000200f9u, 0x00000157u, 0x000200f8u, 0x0000015au, 0x0003003eu, 0x00000155u,
0x0000015bu, 0x000200f9u, 0x00000157u, 0x000200f8u, 0x00000157u, 0x0004003du,
0x00000006u, 0x0000015cu, 0x00000155u, 0x0003003eu, 0x00000150u, 0x0000015cu,
0x0003003eu, 0x0000015du, 0x0000003bu, 0x0003003eu, 0x0000015eu, 0x0000003au,
0x0003003eu, 0x0000015fu, 0x0000006bu, 0x000200f9u, 0x00000160u, 0x000200f8u,
0x00000160u, 0x000400f6u, 0x00000162u, 0x00000163u, 0x00000000u, 0x000200f9u,
0x00000164u, 0x000200f8u, 0x00000164u, 0x0004003du, 0x00000006u, 0x00000165u,
0x0000015fu, 0x0004003du, 0x00000006u, 0x00000166u, 0x00000150u, 0x000500b0u,
0x0000006au, 0x00000167u, 0x00000165u, 0x00000166u, 0x000400fau, 0x00000167u,
0x00000161u, 0x00000162u, 0x000200f8u, 0x00000161u, 0x0004003du, 0x00000006u,
0x00000169u, 0x0000015fu, 0x00040070u, 0x00000008u, 0x0000016au, 0x00000169u,
0x0004003du, 0x00000006u, 0x0000016bu, 0x00000150u, 0x00040070u, 0x00000008u,
0x0000016cu, 0x0000016bu, 0x00050088u, 0x00000008u, 0x0000016du, 0x0000016au,
0x0000016cu, 0x0003003eu, 0x00000168u, 0x0000016du, 0x0004003du, 0x00000006u,
0x00000170u, 0x0000015fu, 0x0003003eu, 0x0000016fu, 0x00000170u, 0x00050039u,
0x00000006u, 0x00000171u, 0x0000001au, 0x0000016fu, 0x00040070u, 0x00000008u,
0x00000172u, 0x00000171u, 0x00050085u, 0x00000008u, 0x00000174u, 0x00000172u,
0x00000173u, 0x0003003eu, 0x0000016eu, 0x00000174u, 0x0004003du, 0x00000008u,
0x00000176u, 0x00000168u, 0x0004003du, 0x00000008u, 0x00000177u, 0x0000016eu,
0x00050050u, 0x0000001cu, 0x00000178u, 0x00000176u, 0x00000177u, 0x0003003eu,
0x00000179u, 0x00000178u, 0x0004003du, 0x00000008u, 0x0000017bu, 0x00000134u,
0x0003003eu, 0x0000017au, 0x0000017bu, 0x00060039u, 0x00000009u, 0x0000017cu,
0x00000022u, 0x00000179u, 0x0000017au, 0x0003003eu, 0x00000175u, 0x0000017cu,
0x0004003du, 0x00000009u, 0x0000017eu, 0x00000147u, 0x00050041u, 0x0000001eu,
0x0000017fu, 0x00000175u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x00000180u,
0x0000017fu, 0x0005008eu, 0x00000009u, 0x00000181u, 0x0000017eu, 0x00000180u,
0x0004003du, 0x00000009u, 0x00000182u, 0x00000148u, 0x00050041u, 0x0000001eu,
0x00000183u, 0x00000175u, 0x0000006fu, 0x0004003du, 0x00000008u, 0x00000184u,
0x00000183u, 0x0005008eu, 0x00000009u, 0x00000185u, 0x00000182u, 0x00000184u,
0x00050081u, 0x00000009u, 0x00000186u, 0x00000181u, 0x00000185u, 0x0004003du,
0x00000009u, 0x00000187u, 0x00000127u, 0x00050041u, 0x0000001eu, 0x00000188u,
0x00000175u, 0x00000079u, 0x0004003du, 0x00000008u, 0x00000189u, 0x00000188u,
0x0005008eu, 0x00000009u, 0x0000018au, 0x00000187u, 0x00000189u, 0x00050081u,
0x00000009u, 0x0000018bu, 0x00000186u, 0x0000018au, 0x0003003eu, 0x0000017du,
0x0000018bu, 0x0004003du, 0x00000009u, 0x0000018du, 0x00000132u, 0x0004003du,
0x00000009u, 0x0000018eu, 0x0000017du, 0x00050094u, 0x00000008u, 0x0000018fu,
0x0000018du, 0x0000018eu, 0x00050085u, 0x00000008u, 0x00000190u, 0x0000002cu,
0x0000018fu, 0x0004003du, 0x00000009u, 0x00000191u, 0x0000017du, 0x0005008eu,
0x00000009u, 0x00000192u, 0x00000191u, 0x00000190u, 0x0004003du, 0x00000009u,
0x00000193u, 0x00000132u, 0x00050083u, 0x00000009u, 0x00000194u, 0x00000192u,
0x00000193u, 0x0006000cu, 0x00000009u, 0x00000195u, 0x00000001u, 0x00000045u,
0x00000194u, 0x0003003eu, 0x0000018cu, 0x00000195u, 0x0004003du, 0x00000009u,
0x00000197u, 0x00000127u, 0x0004003du, 0x00000009u, 0x00000198u, 0x0000018cu,
0x00050094u, 0x00000008u, 0x00000199u, 0x00000197u, 0x00000198u, 0x0007000cu,
0x00000008u, 0x0000019au, 0x00000001u, 0x00000028u, 0x00000199u, 0x0000003au,
0x0003003eu, 0x00000196u, 0x0000019au, 0x0004003du, 0x00000008u, 0x0000019bu,
0x00000196u, 0x000500bau, 0x0000006au, 0x0000019cu, 0x0000019bu, 0x0000003au,
0x000300f7u, 0x0000019eu, 0x00000000u, 0x000400fau, 0x0000019cu, 0x0000019du,
0x0000019eu, 0x000200f8u, 0x0000019du, 0x0004003du, 0x000001a0u, 0x000001a3u,
0x000001a2u, 0x0004003du, 0x00000009u, 0x000001a4u, 0x0000018cu, 0x00070058u,
0x000001a5u, 0x000001a6u, 0x000001a3u, 0x000001a4u, 0x00000002u, 0x0000003au,
0x0008004fu, 0x00000009u, 0x000001a7u, 0x000001a6u, 0x000001a6u, 0x00000000u,
0x00000001u, 0x00000002u, 0x0004003du, 0x00000008u, 0x000001a8u, 0x00000196u,
0x0005008eu, 0x00000009u, 0x000001a9u, 0x000001a7u, 0x000001a8u, 0x0004003du,
0x00000009u, 0x000001aau, 0x0000015du, 0x00050081u, 0x00000009u, 0x000001abu,
0x000001aau, 0x000001a9u, 0x0003003eu, 0x0000015du, 0x000001abu, 0x0004003du,
0x00000008u, 0x000001acu, 0x00000196u, 0x0004003du, 0x00000008u, 0x000001adu,
0x0000015eu, 0x00050081u, 0x00000008u, 0x000001aeu, 0x000001adu, 0x000001acu,
0x0003003eu, 0x0000015eu, 0x000001aeu, 0x000200f9u, 0x0000019eu, 0x000200f8u,
0x0000019eu, 0x000200f9u, 0x00000163u, 0x000200f8u, 0x00000163u, 0x0004003du,
0x00000006u, 0x000001afu, 0x0000015fu, 0x00050080u, 0x00000006u, 0x000001b0u,
0x000001afu, 0x000000a0u, 0x0003003eu, 0x0000015fu, 0x000001b0u, 0x000200f9u,
0x00000160u, 0x000200f8u, 0x00000162u, 0x0004003du, 0x00000008u, 0x000001b2u,
0x0000015eu, 0x000500bau, 0x0000006au, 0x000001b3u, 0x000001b2u, 0x000000d9u,
0x000300f7u, 0x000001b6u, 0x00000000u, 0x000400fau, 0x000001b3u, 0x000001b5u,
0x000001bbu, 0x000200f8u, 0x000001b5u, 0x0004003du, 0x00000009u, 0x000001b7u,
0x0000015du, 0x0004003du, 0x00000008u, 0x000001b8u, 0x0000015eu, 0x00060050u,
0x00000009u, 0x000001b9u, 0x000001b8u, 0x000001b8u, 0x000001b8u, 0x00050088u,
0x00000009u, 0x000001bau, 0x000001b7u, 0x000001b9u, 0x0003003eu, 0x000001b4u,
0x000001bau, 0x000200f9u, 0x000001b6u, 0x000200f8u, 0x000001bbu, 0x0003003eu,
0x000001b4u, 0x0000003bu, 0x000200f9u, 0x000001b6u, 0x000200f8u, 0x000001b6u,
0x0004003du, 0x00000009u, 0x000001bcu, 0x000001b4u, 0x0003003eu, 0x000001b1u,
0x000001bcu, 0x0004003du, 0x000001bdu, 0x000001c0u, 0x000001bfu, 0x0004003du,
0x00000006u, 0x000001c1u, 0x00000106u, 0x0004007cu, 0x00000097u, 0x000001c2u,
0x000001c1u, 0x0004003du, 0x00000006u, 0x000001c3u, 0x00000109u, 0x0004007cu,
0x00000097u, 0x000001c4u, 0x000001c3u, 0x0004003du, 0x00000006u, 0x000001c5u,
0x000000ffu, 0x0004007cu, 0x00000097u, 0x000001c6u, 0x000001c5u, 0x00060050u,
0x000001c7u, 0x000001c8u, 0x000001c2u, 0x000001c4u, 0x000001c6u, 0x0004003du,
0x00000009u, 0x000001c9u, 0x000001b1u, 0x00050051u, 0x00000008u, 0x000001cau,
0x000001c9u, 0x00000000u, 0x00050051u, 0x00000008u, 0x000001cbu, 0x000001c9u,
0x00000001u, 0x00050051u, 0x00000008u, 0x000001ccu, 0x000001c9u, 0x00000002u,
0x00070050u, 0x000001a5u, 0x000001cdu, 0x000001cau, 0x000001cbu, 0x000001ccu,
0x0000002eu, 0x00040063u, 0x000001c0u, 0x000001c8u, 0x000001cdu, 0x000100fdu,
0x00010038u, 0x00050036u, 0x00000009u, 0x0000000fu, 0x00000000u, 0x0000000au,
0x00030037u, 0x00000007u, 0x0000000bu, 0x00030037u, 0x00000007u, 0x0000000cu,
0x00030037u, 0x00000007u, 0x0000000du, 0x00030037u, 0x00000007u, 0x0000000eu,
0x000200f8u, 0x00000010u, 0x0004003bu, 0x0000001eu, 0x00000024u, 0x00000007u,
0x0004003bu, 0x0000001eu, 0x00000030u, 0x00000007u, 0x0004003bu, 0x00000011u,
0x00000039u, 0x00000007u, 0x0004003du, 0x00000006u, 0x00000025u, 0x0000000cu,
0x00040070u, 0x00000008u, 0x00000026u, 0x00000025u, 0x00050081u, 0x00000008u,
0x00000028u, 0x00000026u, 0x00000027u, 0x0004003du, 0x00000006u, 0x00000029u,
0x0000000eu, 0x00040070u, 0x00000008u, 0x0000002au, 0x00000029u, 0x00050088u,
0x00000008u, 0x0000002bu, 0x00000028u, 0x0000002au, 0x00050085u, 0x00000008u,
0x0000002du, 0x0000002bu, 0x0000002cu, 0x00050083u, 0x00000008u, 0x0000002fu,
0x0000002du, 0x0000002eu, 0x0003003eu, 0x00000024u, 0x0000002fu, 0x0004003du,
0x00000006u, 0x00000031u, 0x0000000du, 0x00040070u, 0x00000008u, 0x00000032u,
0x00000031u, 0x00050081u, 0x00000008u, 0x00000033u, 0x00000032u, 0x00000027u,
0x0004003du, 0x00000006u, 0x00000034u, 0x0000000eu, 0x00040070u, 0x00000008u,
0x00000035u, 0x00000034u, 0x00050088u, 0x00000008u, 0x00000036u, 0x00000033u,
0x00000035u, 0x00050085u, 0x00000008u, 0x00000037u, 0x00000036u, 0x0000002cu,
0x00050083u, 0x00000008u, 0x00000038u, 0x00000037u, 0x0000002eu, 0x0003003eu,
0x00000030u, 0x00000038u, 0x0003003eu, 0x00000039u, 0x0000003bu, 0x0004003du,
0x00000006u, 0x0000003cu, 0x0000000bu, 0x000300f7u, 0x00000043u, 0x00000000u,
0x000d00fbu, 0x0000003cu, 0x00000042u, 0x00000000u, 0x0000003du, 0x00000001u,
0x0000003eu, 0x00000002u, 0x0000003fu, 0x00000003u, 0x00000040u, 0x00000004u,
0x00000041u, 0x000200f8u, 0x00000042u, 0x0004003du, 0x00000008u, 0x0000005eu,
0x00000024u, 0x0004007fu, 0x00000008u, 0x0000005fu, 0x0000005eu, 0x0004003du,
0x00000008u, 0x00000060u, 0x00000030u, 0x0004007fu, 0x00000008u, 0x00000061u,
0x00000060u, 0x00060050u, 0x00000009u, 0x00000062u, 0x0000005fu, 0x00000061u,
0x0000004au, 0x0003003eu, 0x00000039u, 0x00000062u, 0x000200f9u, 0x00000043u,
0x000200f8u, 0x0000003du, 0x0004003du, 0x00000008u, 0x00000044u, 0x00000030u,
0x0004007fu, 0x00000008u, 0x00000045u, 0x00000044u, 0x0004003du, 0x00000008u,
0x00000046u, 0x00000024u, 0x0004007fu, 0x00000008u, 0x00000047u, 0x00000046u,
0x00060050u, 0x00000009u, 0x00000048u, 0x0000002eu, 0x00000045u, 0x00000047u,
0x0003003eu, 0x00000039u, 0x00000048u, 0x000200f9u, 0x00000043u, 0x000200f8u,
0x0000003eu, 0x0004003du, 0x00000008u, 0x0000004bu, 0x00000030u, 0x0004007fu,
0x00000008u, 0x0000004cu, 0x0000004bu, 0x0004003du, 0x00000008u, 0x0000004du,
0x00000024u, 0x00060050u, 0x00000009u, 0x0000004eu, 0x0000004au, 0x0000004cu,
0x0000004du, 0x0003003eu, 0x00000039u, 0x0000004eu, 0x000200f9u, 0x00000043u,
0x000200f8u, 0x0000003fu, 0x0004003du, 0x00000008u, 0x00000050u, 0x00000024u,
0x0004003du, 0x00000008u, 0x00000051u, 0x00000030u, 0x00060050u, 0x00000009u,
0x00000052u, 0x00000050u, 0x0000002eu, 0x00000051u, 0x0003003eu, 0x00000039u,
0x00000052u, 0x000200f9u, 0x00000043u, 0x000200f8u, 0x00000040u, 0x0004003du,
0x00000008u, 0x00000054u, 0x00000024u, 0x0004003du, 0x00000008u, 0x00000055u,
0x00000030u, 0x0004007fu, 0x00000008u, 0x00000056u, 0x00000055u, 0x00060050u,
0x00000009u, 0x00000057u, 0x00000054u, 0x0000004au, 0x00000056u, 0x0003003eu,
0x00000039u, 0x00000057u, 0x000200f9u, 0x00000043u, 0x000200f8u, 0x00000041u,
0x0004003du, 0x00000008u, 0x00000059u, 0x00000024u, 0x0004003du, 0x00000008u,
0x0000005au, 0x00000030u, 0x0004007fu, 0x00000008u, 0x0000005bu, 0x0000005au,
0x00060050u, 0x00000009u, 0x0000005cu, 0x00000059u, 0x0000005bu, 0x0000002eu,
0x0003003eu, 0x00000039u, 0x0000005cu, 0x000200f9u, 0x00000043u, 0x000200f8u,
0x00000043u, 0x0004003du, 0x00000009u, 0x00000065u, 0x00000039u, 0x0006000cu,
0x00000009u, 0x00000066u, 0x00000001u, 0x00000045u, 0x00000065u, 0x000200feu,
0x00000066u, 0x00010038u, 0x00050036u, 0x00000002u, 0x00000016u, 0x00000000u,
0x00000012u, 0x00030037u, 0x00000011u, 0x00000013u, 0x00030037u, 0x00000011u,
0x00000014u, 0x00030037u, 0x00000011u, 0x00000015u, 0x000200f8u, 0x00000017u,
0x0004003bu, 0x00000011u, 0x00000069u, 0x00000007u, 0x0003003eu, 0x00000069u,
0x0000003bu, 0x00050041u, 0x0000001eu, 0x0000006cu, 0x00000013u, 0x0000006bu,
0x0004003du, 0x00000008u, 0x0000006du, 0x0000006cu, 0x0006000cu, 0x00000008u,
0x0000006eu, 0x00000001u, 0x00000004u, 0x0000006du, 0x00050041u, 0x0000001eu,
0x00000070u, 0x00000013u, 0x0000006fu, 0x0004003du, 0x00000008u, 0x00000071u,
0x00000070u, 0x0006000cu, 0x00000008u, 0x00000072u, 0x00000001u, 0x00000004u,
0x00000071u, 0x000500b8u, 0x0000006au, 0x00000073u, 0x0000006eu, 0x00000072u,
0x000300f7u, 0x00000075u, 0x00000000u, 0x000400fau, 0x00000073u, 0x00000074u,
0x00000075u, 0x000200f8u, 0x00000074u, 0x00050041u, 0x0000001eu, 0x00000076u,
0x00000013u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x00000077u, 0x00000076u,
0x0006000cu, 0x00000008u, 0x00000078u, 0x00000001u, 0x00000004u, 0x00000077u,
0x00050041u, 0x0000001eu, 0x0000007au, 0x00000013u, 0x00000079u, 0x0004003du,
0x00000008u, 0x0000007bu, 0x0000007au, 0x0006000cu, 0x00000008u, 0x0000007cu,
0x00000001u, 0x00000004u, 0x0000007bu, 0x000500b8u, 0x0000006au, 0x0000007du,
0x00000078u, 0x0000007cu, 0x000200f9u, 0x00000075u, 0x000200f8u, 0x00000075u,
0x000700f5u, 0x0000006au, 0x0000007eu, 0x00000073u, 0x00000017u, 0x0000007du,
0x00000074u, 0x000300f7u, 0x00000080u, 0x00000000u, 0x000400fau, 0x0000007eu,
0x0000007fu, 0x00000082u, 0x000200f8u, 0x0000007fu, 0x0003003eu, 0x00000069u,
0x00000081u, 0x000200f9u, 0x00000080u, 0x000200f8u, 0x00000082u, 0x00050041u,
0x0000001eu, 0x00000083u, 0x00000013u, 0x0000006fu, 0x0004003du, 0x00000008u,
0x00000084u, 0x00000083u, 0x0006000cu, 0x00000008u, 0x00000085u, 0x00000001u,
0x00000004u, 0x00000084u, 0x00050041u, 0x0000001eu, 0x00000086u, 0x00000013u,
0x00000079u, 0x0004003du, 0x00000008u, 0x00000087u, 0x00000086u, 0x0006000cu,
0x00000008u, 0x00000088u, 0x00000001u, 0x00000004u, 0x00000087u, 0x000500b8u,
0x0000006au, 0x00000089u, 0x00000085u, 0x00000088u, 0x000300f7u, 0x0000008bu,
0x00000000u, 0x000400fau, 0x00000089u, 0x0000008au, 0x0000008du, 0x000200f8u,
0x0000008au, 0x0003003eu, 0x00000069u, 0x0000008cu, 0x000200f9u, 0x0000008bu,
0x000200f8u, 0x0000008du, 0x0003003eu, 0x00000069u, 0x0000008eu, 0x000200f9u,
0x0000008bu, 0x000200f8u, 0x0000008bu, 0x000200f9u, 0x00000080u, 0x000200f8u,
0x00000080u, 0x0004003du, 0x00000009u, 0x0000008fu, 0x00000013u, 0x0004003du,
0x00000009u, 0x00000090u, 0x00000069u, 0x0007000cu, 0x00000009u, 0x00000091u,
0x00000001u, 0x00000044u, 0x0000008fu, 0x00000090u, 0x0006000cu, 0x00000009u,
0x00000092u, 0x00000001u, 0x00000045u, 0x00000091u, 0x0003003eu, 0x00000014u,
0x00000092u, 0x0004003du, 0x00000009u, 0x00000093u, 0x00000013u, 0x0004003du,
0x00000009u, 0x00000094u, 0x00000014u, 0x0007000cu, 0x00000009u, 0x00000095u,
0x00000001u, 0x00000044u, 0x00000093u, 0x00000094u, 0x0003003eu, 0x00000015u,
0x00000095u, 0x000100fdu, 0x00010038u, 0x00050036u, 0x00000006u, 0x0000001au,
0x00000000u, 0x00000018u, 0x00030037u, 0x00000007u, 0x00000019u, 0x000200f8u,
0x0000001bu, 0x0004003du, 0x00000006u, 0x00000096u, 0x00000019u, 0x000500c4u,
0x00000006u, 0x00000099u, 0x00000096u, 0x00000098u, 0x0004003du, 0x00000006u,
0x0000009au, 0x00000019u, 0x000500c2u, 0x00000006u, 0x0000009bu, 0x0000009au,
0x00000098u, 0x000500c5u, 0x00000006u, 0x0000009cu, 0x00000099u, 0x0000009bu,
0x0003003eu, 0x00000019u, 0x0000009cu, 0x0004003du, 0x00000006u, 0x0000009du,
0x00000019u, 0x000500c7u, 0x00000006u, 0x0000009fu, 0x0000009du, 0x0000009eu,
0x000500c4u, 0x00000006u, 0x000000a1u, 0x0000009fu, 0x000000a0u, 0x0004003du,
0x00000006u, 0x000000a2u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000a4u,
0x000000a2u, 0x000000a3u, 0x000500c2u, 0x00000006u, 0x000000a5u, 0x000000a4u,
0x000000a0u, 0x000500c5u, 0x00000006u, 0x000000a6u, 0x000000a1u, 0x000000a5u,
0x0003003eu, 0x00000019u, 0x000000a6u, 0x0004003du, 0x00000006u, 0x000000a7u,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000a9u, 0x000000a7u, 0x000000a8u,
0x000500c4u, 0x00000006u, 0x000000abu, 0x000000a9u, 0x000000aau, 0x0004003du,
0x00000006u, 0x000000acu, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000aeu,
0x000000acu, 0x000000adu, 0x000500c2u, 0x00000006u, 0x000000afu, 0x000000aeu,
0x000000aau, 0x000500c5u, 0x00000006u, 0x000000b0u, 0x000000abu, 0x000000afu,
0x0003003eu, 0x00000019u, 0x000000b0u, 0x0004003du, 0x00000006u, 0x000000b1u,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000b3u, 0x000000b1u, 0x000000b2u,
0x000500c4u, 0x00000006u, 0x000000b5u, 0x000000b3u, 0x000000b4u, 0x0004003du,
0x00000006u, 0x000000b6u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000b8u,
0x000000b6u, 0x000000b7u, 0x000500c2u, 0x00000006u, 0x000000b9u, 0x000000b8u,
0x000000b4u, 0x000500c5u, 0x00000006u, 0x000000bau, 0x000000b5u, 0x000000b9u,
0x0003003eu, 0x00000019u, 0x000000bau, 0x0004003du, 0x00000006u, 0x000000bbu,
0x00000019u, 0x000500c7u, 0x00000006u, 0x000000bdu, 0x000000bbu, 0x000000bcu,
0x000500c4u, 0x00000006u, 0x000000bfu, 0x000000bdu, 0x000000beu, 0x0004003du,
0x00000006u, 0x000000c0u, 0x00000019u, 0x000500c7u, 0x00000006u, 0x000000c2u,
0x000000c0u, 0x000000c1u, 0x000500c2u, 0x00000006u, 0x000000c3u, 0x000000c2u,
0x000000beu, 0x000500c5u, 0x00000006u, 0x000000c4u, 0x000000bfu, 0x000000c3u,
0x0003003eu, 0x00000019u, 0x000000c4u, 0x0004003du, 0x00000006u, 0x000000c5u,
0x00000019u, 0x000200feu, 0x000000c5u, 0x00010038u, 0x00050036u, 0x00000009u,
0x00000022u, 0x00000000u, 0x0000001fu, 0x00030037u, 0x0000001du, 0x00000020u,
0x00030037u, 0x0000001eu, 0x00000021u, 0x000200f8u, 0x00000023u, 0x0004003bu,
0x0000001eu, 0x000000c8u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000ccu,
0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000d0u, 0x00000007u, 0x0004003bu,
0x0000001eu, 0x000000d7u, 0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000dbu,
0x00000007u, 0x0004003bu, 0x0000001eu, 0x000000e7u, 0x00000007u, 0x0004003bu,
0x0000001eu, 0x000000ecu, 0x00000007u, 0x0004003du, 0x00000008u, 0x000000c9u,
0x00000021u, 0x0004003du, 0x00000008u, 0x000000cau, 0x00000021u, 0x00050085u,
0x00000008u, 0x000000cbu, 0x000000c9u, 0x000000cau, 0x0003003eu, 0x000000c8u,
0x000000cbu, 0x0004003du, 0x00000008u, 0x000000cdu, 0x000000c8u, 0x0004003du,
0x00000008u, 0x000000ceu, 0x000000c8u, 0x00050085u, 0x00000008u, 0x000000cfu,
0x000000cdu, 0x000000ceu, 0x0003003eu, 0x000000ccu, 0x000000cfu, 0x0004003du,
0x00000008u, 0x000000d1u, 0x000000ccu, 0x00050083u, 0x00000008u, 0x000000d2u,
0x000000d1u, 0x0000002eu, 0x00050041u, 0x0000001eu, 0x000000d3u, 0x00000020u,
0x0000006fu, 0x0004003du, 0x00000008u, 0x000000d4u, 0x000000d3u, 0x00050085u,
0x00000008u, 0x000000d5u, 0x000000d2u, 0x000000d4u, 0x00050081u, 0x00000008u,
0x000000d6u, 0x0000002eu, 0x000000d5u, 0x0003003eu, 0x000000d0u, 0x000000d6u,
0x0004003du, 0x00000008u, 0x000000d8u, 0x000000d0u, 0x000500bau, 0x0000006au,
0x000000dau, 0x000000d8u, 0x000000d9u, 0x000300f7u, 0x000000ddu, 0x00000000u,
0x000400fau, 0x000000dau, 0x000000dcu, 0x000000e5u, 0x000200f8u, 0x000000dcu,
0x00050041u, 0x0000001eu, 0x000000deu, 0x00000020u, 0x0000006fu, 0x0004003du,
0x00000008u, 0x000000dfu, 0x000000deu, 0x00050083u, 0x00000008u, 0x000000e0u,
0x0000002eu, 0x000000dfu, 0x0007000cu, 0x00000008u, 0x000000e1u, 0x00000001u,
0x00000028u, 0x000000e0u, 0x0000003au, 0x0004003du, 0x00000008u, 0x000000e2u,
0x000000d0u, 0x00050088u, 0x00000008u, 0x000000e3u, 0x000000e1u, 0x000000e2u,
0x0006000cu, 0x00000008u, 0x000000e4u, 0x00000001u, 0x0000001fu, 0x000000e3u,
0x0003003eu, 0x000000dbu, 0x000000e4u, 0x000200f9u, 0x000000ddu, 0x000200f8u,
0x000000e5u, 0x0003003eu, 0x000000dbu, 0x0000002eu, 0x000200f9u, 0x000000ddu,
0x000200f8u, 0x000000ddu, 0x0004003du, 0x00000008u, 0x000000e6u, 0x000000dbu,
0x0003003eu, 0x000000d7u, 0x000000e6u, 0x00050041u, 0x0000001eu, 0x000000e9u,
0x00000020u, 0x0000006bu, 0x0004003du, 0x00000008u, 0x000000eau, 0x000000e9u,
0x00050085u, 0x00000008u, 0x000000ebu, 0x000000e8u, 0x000000eau, 0x0003003eu,
0x000000e7u, 0x000000ebu, 0x0004003du, 0x00000008u, 0x000000edu, 0x000000d7u,
0x0004003du, 0x00000008u, 0x000000eeu, 0x000000d7u, 0x00050085u, 0x00000008u,
0x000000efu, 0x000000edu, 0x000000eeu, 0x00050083u, 0x00000008u, 0x000000f0u,
0x0000002eu, 0x000000efu, 0x0007000cu, 0x00000008u, 0x000000f1u, 0x00000001u,
0x00000028u, 0x000000f0u, 0x0000003au, 0x0006000cu, 0x00000008u, 0x000000f2u,
0x00000001u, 0x0000001fu, 0x000000f1u, 0x0003003eu, 0x000000ecu, 0x000000f2u,
0x0004003du, 0x00000008u, 0x000000f3u, 0x000000ecu, 0x0004003du, 0x00000008u,
0x000000f4u, 0x000000e7u, 0x0006000cu, 0x00000008u, 0x000000f5u, 0x00000001u,
0x0000000eu, 0x000000f4u, 0x00050085u, 0x00000008u, 0x000000f6u, 0x000000f3u,
0x000000f5u, 0x0004003du, 0x00000008u, 0x000000f7u, 0x000000ecu, 0x0004003du,
0x00000008u, 0x000000f8u, 0x000000e7u, 0x0006000cu, 0x00000008u, 0x000000f9u,
0x00000001u, 0x0000000du, 0x000000f8u, 0x00050085u, 0x00000008u, 0x000000fau,
0x000000f7u, 0x000000f9u, 0x0004003du, 0x00000008u, 0x000000fbu, 0x000000d7u,
0x00060050u, 0x00000009u, 0x000000fcu, 0x000000f6u, 0x000000fau, 0x000000fbu,
0x000200feu, 0x000000fcu, 0x00010038u,
};
+41
View File
@@ -0,0 +1,41 @@
// skybox.frag — P4-05: skybox fragment shader (cubemap sample).
//
// Samples the HDR source cubemap along the view ray; outputs linear-HDR
// radiance (alpha 1). The post pass (P4-02) tonemaps at frame time —
// no sRGB encode here. Push constants: inverse view rotation 3x3
// (row-major, 36 bytes) + exposure (float, exposure already applied to
// the cubemap at import; kept for forward-compat, must be 1.0 in tests).
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into skybox_frag_spv.inc (both shader dirs).
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(location = 0) in vec2 v_ndc;
layout(location = 0) out vec4 o_color;
layout(set = 0, binding = 0) uniform samplerCube u_sky;
layout(push_constant, scalar) uniform SkyPush {
float inv_view_0;
float inv_view_1;
float inv_view_2;
float inv_view_3;
float inv_view_4;
float inv_view_5;
float inv_view_6;
float inv_view_7;
float inv_view_8;
float exposure;
} g_push;
void main() {
vec3 v = vec3(v_ndc, -1.0);
vec3 d = vec3(
g_push.inv_view_0 * v.x + g_push.inv_view_1 * v.y + g_push.inv_view_2 * v.z,
g_push.inv_view_3 * v.x + g_push.inv_view_4 * v.y + g_push.inv_view_5 * v.z,
g_push.inv_view_6 * v.x + g_push.inv_view_7 * v.y + g_push.inv_view_8 * v.z);
d = normalize(d);
vec3 hdr = texture(u_sky, d).rgb * g_push.exposure;
o_color = vec4(hdr, 1.0);
}
+26
View File
@@ -0,0 +1,26 @@
// skybox.vert — P4-05: fullscreen-triangle skybox vertex shader.
//
// Emits a clip-space triangle covering the screen with NDC xy and
// depth = w (far plane, NDC z = 1): position = (ndc.x, ndc.y, 1, 1).
// The fragment shader reconstructs the view ray from a push-constant
// inverse view rotation + NDC. No vertex input (gl_VertexIndex only).
//
// GLSL 460. Offline SPIR-V via glslangValidator (vulkan1.3), embedded
// with embed_spv.py into skybox_vert_spv.inc (both shader dirs).
#version 460
layout(location = 0) out vec2 v_ndc;
void main() {
// Fullscreen triangle: (-1,-1) (3,-1) (-1,3).
vec2 pos = vec2(0.0);
if (gl_VertexIndex == 0) {
pos = vec2(-1.0, -1.0);
} else if (gl_VertexIndex == 1) {
pos = vec2(3.0, -1.0);
} else {
pos = vec2(-1.0, 3.0);
}
v_ndc = pos;
gl_Position = vec4(pos, 1.0, 1.0);
}
+130
View File
@@ -0,0 +1,130 @@
// skybox_frag.spv — 727 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S frag -o skybox_frag.spv skybox.frag
// then: python3 native/renderer/shaders/embed_spv.py skybox_frag.spv skybox_frag_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kSkybox_fragSpvWords = 727u;
inline constexpr std::uint32_t kSkybox_fragSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000072u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0009000fu, 0x00000004u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000cu, 0x00000015u, 0x00000060u,
0x0000006bu, 0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u,
0x000001ccu, 0x00080004u, 0x455f4c47u, 0x735f5458u, 0x616c6163u, 0x6c625f72u,
0x5f6b636fu, 0x6f79616cu, 0x00007475u, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00000076u, 0x00040005u, 0x0000000cu,
0x646e5f76u, 0x00000063u, 0x00030005u, 0x00000012u, 0x00000064u, 0x00040005u,
0x00000013u, 0x50796b53u, 0x00687375u, 0x00060006u, 0x00000013u, 0x00000000u,
0x5f766e69u, 0x77656976u, 0x0000305fu, 0x00060006u, 0x00000013u, 0x00000001u,
0x5f766e69u, 0x77656976u, 0x0000315fu, 0x00060006u, 0x00000013u, 0x00000002u,
0x5f766e69u, 0x77656976u, 0x0000325fu, 0x00060006u, 0x00000013u, 0x00000003u,
0x5f766e69u, 0x77656976u, 0x0000335fu, 0x00060006u, 0x00000013u, 0x00000004u,
0x5f766e69u, 0x77656976u, 0x0000345fu, 0x00060006u, 0x00000013u, 0x00000005u,
0x5f766e69u, 0x77656976u, 0x0000355fu, 0x00060006u, 0x00000013u, 0x00000006u,
0x5f766e69u, 0x77656976u, 0x0000365fu, 0x00060006u, 0x00000013u, 0x00000007u,
0x5f766e69u, 0x77656976u, 0x0000375fu, 0x00060006u, 0x00000013u, 0x00000008u,
0x5f766e69u, 0x77656976u, 0x0000385fu, 0x00060006u, 0x00000013u, 0x00000009u,
0x6f707865u, 0x65727573u, 0x00000000u, 0x00040005u, 0x00000015u, 0x75705f67u,
0x00006873u, 0x00030005u, 0x0000005cu, 0x00726468u, 0x00040005u, 0x00000060u,
0x6b735f75u, 0x00000079u, 0x00040005u, 0x0000006bu, 0x6f635f6fu, 0x00726f6cu,
0x00040047u, 0x0000000cu, 0x0000001eu, 0x00000000u, 0x00030047u, 0x00000013u,
0x00000002u, 0x00050048u, 0x00000013u, 0x00000000u, 0x00000023u, 0x00000000u,
0x00050048u, 0x00000013u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u,
0x00000013u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000013u,
0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000013u, 0x00000004u,
0x00000023u, 0x00000010u, 0x00050048u, 0x00000013u, 0x00000005u, 0x00000023u,
0x00000014u, 0x00050048u, 0x00000013u, 0x00000006u, 0x00000023u, 0x00000018u,
0x00050048u, 0x00000013u, 0x00000007u, 0x00000023u, 0x0000001cu, 0x00050048u,
0x00000013u, 0x00000008u, 0x00000023u, 0x00000020u, 0x00050048u, 0x00000013u,
0x00000009u, 0x00000023u, 0x00000024u, 0x00040047u, 0x00000060u, 0x00000021u,
0x00000000u, 0x00040047u, 0x00000060u, 0x00000022u, 0x00000000u, 0x00040047u,
0x0000006bu, 0x0000001eu, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x00040017u, 0x0000000au, 0x00000006u, 0x00000002u, 0x00040020u,
0x0000000bu, 0x00000001u, 0x0000000au, 0x0004003bu, 0x0000000bu, 0x0000000cu,
0x00000001u, 0x0004002bu, 0x00000006u, 0x0000000eu, 0xbf800000u, 0x000c001eu,
0x00000013u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u,
0x00000014u, 0x00000009u, 0x00000013u, 0x0004003bu, 0x00000014u, 0x00000015u,
0x00000009u, 0x00040015u, 0x00000016u, 0x00000020u, 0x00000001u, 0x0004002bu,
0x00000016u, 0x00000017u, 0x00000000u, 0x00040020u, 0x00000018u, 0x00000009u,
0x00000006u, 0x00040015u, 0x0000001bu, 0x00000020u, 0x00000000u, 0x0004002bu,
0x0000001bu, 0x0000001cu, 0x00000000u, 0x00040020u, 0x0000001du, 0x00000007u,
0x00000006u, 0x0004002bu, 0x00000016u, 0x00000021u, 0x00000001u, 0x0004002bu,
0x0000001bu, 0x00000024u, 0x00000001u, 0x0004002bu, 0x00000016u, 0x00000029u,
0x00000002u, 0x0004002bu, 0x0000001bu, 0x0000002cu, 0x00000002u, 0x0004002bu,
0x00000016u, 0x00000031u, 0x00000003u, 0x0004002bu, 0x00000016u, 0x00000037u,
0x00000004u, 0x0004002bu, 0x00000016u, 0x0000003eu, 0x00000005u, 0x0004002bu,
0x00000016u, 0x00000045u, 0x00000006u, 0x0004002bu, 0x00000016u, 0x0000004bu,
0x00000007u, 0x0004002bu, 0x00000016u, 0x00000052u, 0x00000008u, 0x00090019u,
0x0000005du, 0x00000006u, 0x00000003u, 0x00000000u, 0x00000000u, 0x00000000u,
0x00000001u, 0x00000000u, 0x0003001bu, 0x0000005eu, 0x0000005du, 0x00040020u,
0x0000005fu, 0x00000000u, 0x0000005eu, 0x0004003bu, 0x0000005fu, 0x00000060u,
0x00000000u, 0x00040017u, 0x00000063u, 0x00000006u, 0x00000004u, 0x0004002bu,
0x00000016u, 0x00000066u, 0x00000009u, 0x00040020u, 0x0000006au, 0x00000003u,
0x00000063u, 0x0004003bu, 0x0000006au, 0x0000006bu, 0x00000003u, 0x0004002bu,
0x00000006u, 0x0000006du, 0x3f800000u, 0x00050036u, 0x00000002u, 0x00000004u,
0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000008u,
0x00000009u, 0x00000007u, 0x0004003bu, 0x00000008u, 0x00000012u, 0x00000007u,
0x0004003bu, 0x00000008u, 0x0000005cu, 0x00000007u, 0x0004003du, 0x0000000au,
0x0000000du, 0x0000000cu, 0x00050051u, 0x00000006u, 0x0000000fu, 0x0000000du,
0x00000000u, 0x00050051u, 0x00000006u, 0x00000010u, 0x0000000du, 0x00000001u,
0x00060050u, 0x00000007u, 0x00000011u, 0x0000000fu, 0x00000010u, 0x0000000eu,
0x0003003eu, 0x00000009u, 0x00000011u, 0x00050041u, 0x00000018u, 0x00000019u,
0x00000015u, 0x00000017u, 0x0004003du, 0x00000006u, 0x0000001au, 0x00000019u,
0x00050041u, 0x0000001du, 0x0000001eu, 0x00000009u, 0x0000001cu, 0x0004003du,
0x00000006u, 0x0000001fu, 0x0000001eu, 0x00050085u, 0x00000006u, 0x00000020u,
0x0000001au, 0x0000001fu, 0x00050041u, 0x00000018u, 0x00000022u, 0x00000015u,
0x00000021u, 0x0004003du, 0x00000006u, 0x00000023u, 0x00000022u, 0x00050041u,
0x0000001du, 0x00000025u, 0x00000009u, 0x00000024u, 0x0004003du, 0x00000006u,
0x00000026u, 0x00000025u, 0x00050085u, 0x00000006u, 0x00000027u, 0x00000023u,
0x00000026u, 0x00050081u, 0x00000006u, 0x00000028u, 0x00000020u, 0x00000027u,
0x00050041u, 0x00000018u, 0x0000002au, 0x00000015u, 0x00000029u, 0x0004003du,
0x00000006u, 0x0000002bu, 0x0000002au, 0x00050041u, 0x0000001du, 0x0000002du,
0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x0000002eu, 0x0000002du,
0x00050085u, 0x00000006u, 0x0000002fu, 0x0000002bu, 0x0000002eu, 0x00050081u,
0x00000006u, 0x00000030u, 0x00000028u, 0x0000002fu, 0x00050041u, 0x00000018u,
0x00000032u, 0x00000015u, 0x00000031u, 0x0004003du, 0x00000006u, 0x00000033u,
0x00000032u, 0x00050041u, 0x0000001du, 0x00000034u, 0x00000009u, 0x0000001cu,
0x0004003du, 0x00000006u, 0x00000035u, 0x00000034u, 0x00050085u, 0x00000006u,
0x00000036u, 0x00000033u, 0x00000035u, 0x00050041u, 0x00000018u, 0x00000038u,
0x00000015u, 0x00000037u, 0x0004003du, 0x00000006u, 0x00000039u, 0x00000038u,
0x00050041u, 0x0000001du, 0x0000003au, 0x00000009u, 0x00000024u, 0x0004003du,
0x00000006u, 0x0000003bu, 0x0000003au, 0x00050085u, 0x00000006u, 0x0000003cu,
0x00000039u, 0x0000003bu, 0x00050081u, 0x00000006u, 0x0000003du, 0x00000036u,
0x0000003cu, 0x00050041u, 0x00000018u, 0x0000003fu, 0x00000015u, 0x0000003eu,
0x0004003du, 0x00000006u, 0x00000040u, 0x0000003fu, 0x00050041u, 0x0000001du,
0x00000041u, 0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x00000042u,
0x00000041u, 0x00050085u, 0x00000006u, 0x00000043u, 0x00000040u, 0x00000042u,
0x00050081u, 0x00000006u, 0x00000044u, 0x0000003du, 0x00000043u, 0x00050041u,
0x00000018u, 0x00000046u, 0x00000015u, 0x00000045u, 0x0004003du, 0x00000006u,
0x00000047u, 0x00000046u, 0x00050041u, 0x0000001du, 0x00000048u, 0x00000009u,
0x0000001cu, 0x0004003du, 0x00000006u, 0x00000049u, 0x00000048u, 0x00050085u,
0x00000006u, 0x0000004au, 0x00000047u, 0x00000049u, 0x00050041u, 0x00000018u,
0x0000004cu, 0x00000015u, 0x0000004bu, 0x0004003du, 0x00000006u, 0x0000004du,
0x0000004cu, 0x00050041u, 0x0000001du, 0x0000004eu, 0x00000009u, 0x00000024u,
0x0004003du, 0x00000006u, 0x0000004fu, 0x0000004eu, 0x00050085u, 0x00000006u,
0x00000050u, 0x0000004du, 0x0000004fu, 0x00050081u, 0x00000006u, 0x00000051u,
0x0000004au, 0x00000050u, 0x00050041u, 0x00000018u, 0x00000053u, 0x00000015u,
0x00000052u, 0x0004003du, 0x00000006u, 0x00000054u, 0x00000053u, 0x00050041u,
0x0000001du, 0x00000055u, 0x00000009u, 0x0000002cu, 0x0004003du, 0x00000006u,
0x00000056u, 0x00000055u, 0x00050085u, 0x00000006u, 0x00000057u, 0x00000054u,
0x00000056u, 0x00050081u, 0x00000006u, 0x00000058u, 0x00000051u, 0x00000057u,
0x00060050u, 0x00000007u, 0x00000059u, 0x00000030u, 0x00000044u, 0x00000058u,
0x0003003eu, 0x00000012u, 0x00000059u, 0x0004003du, 0x00000007u, 0x0000005au,
0x00000012u, 0x0006000cu, 0x00000007u, 0x0000005bu, 0x00000001u, 0x00000045u,
0x0000005au, 0x0003003eu, 0x00000012u, 0x0000005bu, 0x0004003du, 0x0000005eu,
0x00000061u, 0x00000060u, 0x0004003du, 0x00000007u, 0x00000062u, 0x00000012u,
0x00050057u, 0x00000063u, 0x00000064u, 0x00000061u, 0x00000062u, 0x0008004fu,
0x00000007u, 0x00000065u, 0x00000064u, 0x00000064u, 0x00000000u, 0x00000001u,
0x00000002u, 0x00050041u, 0x00000018u, 0x00000067u, 0x00000015u, 0x00000066u,
0x0004003du, 0x00000006u, 0x00000068u, 0x00000067u, 0x0005008eu, 0x00000007u,
0x00000069u, 0x00000065u, 0x00000068u, 0x0003003eu, 0x0000005cu, 0x00000069u,
0x0004003du, 0x00000007u, 0x0000006cu, 0x0000005cu, 0x00050051u, 0x00000006u,
0x0000006eu, 0x0000006cu, 0x00000000u, 0x00050051u, 0x00000006u, 0x0000006fu,
0x0000006cu, 0x00000001u, 0x00050051u, 0x00000006u, 0x00000070u, 0x0000006cu,
0x00000002u, 0x00070050u, 0x00000063u, 0x00000071u, 0x0000006eu, 0x0000006fu,
0x00000070u, 0x0000006du, 0x0003003eu, 0x0000006bu, 0x00000071u, 0x000100fdu,
0x00010038u,
};
@@ -0,0 +1,65 @@
// skybox_vert.spv — 340 words, build-embedded (see shaders/README).
// Regenerate: glslangValidator -V --target-env vulkan1.3 -S vert -o skybox_vert.spv skybox.vert
// then: python3 native/renderer/shaders/embed_spv.py skybox_vert.spv skybox_vert_spv.inc [--regen "cmd"]
#pragma once
#include <cstdint>
inline constexpr std::uint32_t kSkybox_vertSpvWords = 340u;
inline constexpr std::uint32_t kSkybox_vertSpv[] = {
0x07230203u, 0x00010600u, 0x0008000bu, 0x00000032u, 0x00000000u, 0x00020011u,
0x00000001u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu,
0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u, 0x0008000fu, 0x00000000u,
0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000eu, 0x00000022u, 0x0000002au,
0x00030003u, 0x00000002u, 0x000001ccu, 0x00040005u, 0x00000004u, 0x6e69616du,
0x00000000u, 0x00030005u, 0x00000009u, 0x00736f70u, 0x00060005u, 0x0000000eu,
0x565f6c67u, 0x65747265u, 0x646e4978u, 0x00007865u, 0x00040005u, 0x00000022u,
0x646e5f76u, 0x00000063u, 0x00060005u, 0x00000028u, 0x505f6c67u, 0x65567265u,
0x78657472u, 0x00000000u, 0x00060006u, 0x00000028u, 0x00000000u, 0x505f6c67u,
0x7469736fu, 0x006e6f69u, 0x00070006u, 0x00000028u, 0x00000001u, 0x505f6c67u,
0x746e696fu, 0x657a6953u, 0x00000000u, 0x00070006u, 0x00000028u, 0x00000002u,
0x435f6c67u, 0x4470696cu, 0x61747369u, 0x0065636eu, 0x00070006u, 0x00000028u,
0x00000003u, 0x435f6c67u, 0x446c6c75u, 0x61747369u, 0x0065636eu, 0x00030005u,
0x0000002au, 0x00000000u, 0x00040047u, 0x0000000eu, 0x0000000bu, 0x0000002au,
0x00040047u, 0x00000022u, 0x0000001eu, 0x00000000u, 0x00030047u, 0x00000028u,
0x00000002u, 0x00050048u, 0x00000028u, 0x00000000u, 0x0000000bu, 0x00000000u,
0x00050048u, 0x00000028u, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u,
0x00000028u, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x00000028u,
0x00000003u, 0x0000000bu, 0x00000004u, 0x00020013u, 0x00000002u, 0x00030021u,
0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u,
0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
0x00000007u, 0x0004002bu, 0x00000006u, 0x0000000au, 0x00000000u, 0x0005002cu,
0x00000007u, 0x0000000bu, 0x0000000au, 0x0000000au, 0x00040015u, 0x0000000cu,
0x00000020u, 0x00000001u, 0x00040020u, 0x0000000du, 0x00000001u, 0x0000000cu,
0x0004003bu, 0x0000000du, 0x0000000eu, 0x00000001u, 0x0004002bu, 0x0000000cu,
0x00000010u, 0x00000000u, 0x00020014u, 0x00000011u, 0x0004002bu, 0x00000006u,
0x00000015u, 0xbf800000u, 0x0005002cu, 0x00000007u, 0x00000016u, 0x00000015u,
0x00000015u, 0x0004002bu, 0x0000000cu, 0x00000019u, 0x00000001u, 0x0004002bu,
0x00000006u, 0x0000001du, 0x40400000u, 0x0005002cu, 0x00000007u, 0x0000001eu,
0x0000001du, 0x00000015u, 0x0005002cu, 0x00000007u, 0x00000020u, 0x00000015u,
0x0000001du, 0x00040020u, 0x00000021u, 0x00000003u, 0x00000007u, 0x0004003bu,
0x00000021u, 0x00000022u, 0x00000003u, 0x00040017u, 0x00000024u, 0x00000006u,
0x00000004u, 0x00040015u, 0x00000025u, 0x00000020u, 0x00000000u, 0x0004002bu,
0x00000025u, 0x00000026u, 0x00000001u, 0x0004001cu, 0x00000027u, 0x00000006u,
0x00000026u, 0x0006001eu, 0x00000028u, 0x00000024u, 0x00000006u, 0x00000027u,
0x00000027u, 0x00040020u, 0x00000029u, 0x00000003u, 0x00000028u, 0x0004003bu,
0x00000029u, 0x0000002au, 0x00000003u, 0x0004002bu, 0x00000006u, 0x0000002cu,
0x3f800000u, 0x00040020u, 0x00000030u, 0x00000003u, 0x00000024u, 0x00050036u,
0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u,
0x0004003bu, 0x00000008u, 0x00000009u, 0x00000007u, 0x0003003eu, 0x00000009u,
0x0000000bu, 0x0004003du, 0x0000000cu, 0x0000000fu, 0x0000000eu, 0x000500aau,
0x00000011u, 0x00000012u, 0x0000000fu, 0x00000010u, 0x000300f7u, 0x00000014u,
0x00000000u, 0x000400fau, 0x00000012u, 0x00000013u, 0x00000017u, 0x000200f8u,
0x00000013u, 0x0003003eu, 0x00000009u, 0x00000016u, 0x000200f9u, 0x00000014u,
0x000200f8u, 0x00000017u, 0x0004003du, 0x0000000cu, 0x00000018u, 0x0000000eu,
0x000500aau, 0x00000011u, 0x0000001au, 0x00000018u, 0x00000019u, 0x000300f7u,
0x0000001cu, 0x00000000u, 0x000400fau, 0x0000001au, 0x0000001bu, 0x0000001fu,
0x000200f8u, 0x0000001bu, 0x0003003eu, 0x00000009u, 0x0000001eu, 0x000200f9u,
0x0000001cu, 0x000200f8u, 0x0000001fu, 0x0003003eu, 0x00000009u, 0x00000020u,
0x000200f9u, 0x0000001cu, 0x000200f8u, 0x0000001cu, 0x000200f9u, 0x00000014u,
0x000200f8u, 0x00000014u, 0x0004003du, 0x00000007u, 0x00000023u, 0x00000009u,
0x0003003eu, 0x00000022u, 0x00000023u, 0x0004003du, 0x00000007u, 0x0000002bu,
0x00000009u, 0x00050051u, 0x00000006u, 0x0000002du, 0x0000002bu, 0x00000000u,
0x00050051u, 0x00000006u, 0x0000002eu, 0x0000002bu, 0x00000001u, 0x00070050u,
0x00000024u, 0x0000002fu, 0x0000002du, 0x0000002eu, 0x0000002cu, 0x0000002cu,
0x00050041u, 0x00000030u, 0x00000031u, 0x0000002au, 0x00000010u, 0x0003003eu,
0x00000031u, 0x0000002fu, 0x000100fdu, 0x00010038u,
};
+56
View File
@@ -601,6 +601,62 @@ engine_apply_base_flags(engine_clustered_lights)
add_test(NAME engine_clustered_lights COMMAND engine_clustered_lights)
set_tests_properties(engine_clustered_lights PROPERTIES TIMEOUT 300)
# P4-05: equirect HDR import + GPU cubemap conversion (CPU face-dir
# contract + stb stbi_loadf probe + llvmpipe compute conversion vs the
# CPU reference; no golden PNG — the cubemap pixels are compared
# in-memory). test_skybox_import.cpp carries its own compute entry
# points (GoldenVkProcs covers graphics-only goldens).
add_executable(engine_skybox_import test_skybox_import.cpp golden_stb.cpp)
target_link_libraries(engine_skybox_import PRIVATE engine_core)
target_compile_definitions(engine_skybox_import PRIVATE
ENGINE_GOLDEN_DIR="${CMAKE_SOURCE_DIR}/native/tests/golden"
ENGINE_GOLDEN_OUT_DIR="${CMAKE_CURRENT_BINARY_DIR}/golden_out")
engine_apply_base_flags(engine_skybox_import)
add_test(NAME engine_skybox_import COMMAND engine_skybox_import)
set_tests_properties(engine_skybox_import PROPERTIES TIMEOUT 300)
# P4-05: split-sum BRDF LUT (Karis) — CPU reference curve + llvmpipe
# compute generation vs the CPU reference; no golden PNG — the LUT pixels
# are compared in-memory. Same golden-TU pattern as engine_skybox_import
# (own compute entry points; GoldenVkProcs covers graphics-only goldens).
add_executable(engine_brdf_lut test_brdf_lut.cpp golden_stb.cpp)
target_link_libraries(engine_brdf_lut PRIVATE engine_core)
target_compile_definitions(engine_brdf_lut PRIVATE
ENGINE_GOLDEN_DIR="${CMAKE_SOURCE_DIR}/native/tests/golden"
ENGINE_GOLDEN_OUT_DIR="${CMAKE_CURRENT_BINARY_DIR}/golden_out")
engine_apply_base_flags(engine_brdf_lut)
add_test(NAME engine_brdf_lut COMMAND engine_brdf_lut)
set_tests_properties(engine_brdf_lut PROPERTIES TIMEOUT 300
${ENGINE_TEST_VIDEO_ENV})
# P4-05: irradiance + prefilter + skybox/IBL integration (CPU import
# plans + basis/evaluate contract, llvmpipe irradiance/prefilter compute
# vs the CPU references, and the ibl_shade split-sphere render proving
# chrome shows sharp HDR reflections while rough shows diffuse/specular).
# Same golden-TU pattern (own compute entry points; GoldenBuildPipe for
# the graphics pair; no golden PNG — pixels compared in-memory).
add_executable(engine_skybox_ibl test_skybox_ibl.cpp golden_stb.cpp)
target_link_libraries(engine_skybox_ibl PRIVATE engine_core)
target_compile_definitions(engine_skybox_ibl PRIVATE
ENGINE_GOLDEN_DIR="${CMAKE_SOURCE_DIR}/native/tests/golden"
ENGINE_GOLDEN_OUT_DIR="${CMAKE_CURRENT_BINARY_DIR}/golden_out")
engine_apply_base_flags(engine_skybox_ibl)
add_test(NAME engine_skybox_ibl COMMAND engine_skybox_ibl)
set_tests_properties(engine_skybox_ibl PROPERTIES TIMEOUT 300
${ENGINE_TEST_VIDEO_ENV})
# P4-12: mesh LOD chain (meshopt_simplify at import, screen-size select
# at draw, crossfade factor) — CPU contract + 3-distance goldens.
add_executable(engine_mesh_lod test_mesh_lod.cpp golden_stb.cpp)
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

+205 -52
View File
@@ -88,6 +88,8 @@ struct GoldenVkProcs {
PFN_vkCmdCopyImageToBuffer cmd_copy_img_buf{nullptr};
PFN_vkCmdSetViewport cmd_viewport{nullptr};
PFN_vkCmdSetScissor cmd_scissor{nullptr};
PFN_vkCreateComputePipelines create_compute{nullptr};
PFN_vkCmdDispatch cmd_dispatch{nullptr};
PFN_vkCreateFence create_fence{nullptr};
PFN_vkDestroyFence destroy_fence{nullptr};
PFN_vkQueueSubmit queue_submit{nullptr};
@@ -202,6 +204,10 @@ inline auto GoldenVkLoad(LoaderFn loader, GoldenVkProcs* out) -> bool {
reinterpret_cast<PFN_vkCmdSetViewport>(load("vkCmdSetViewport"));
out->cmd_scissor =
reinterpret_cast<PFN_vkCmdSetScissor>(load("vkCmdSetScissor"));
out->create_compute = reinterpret_cast<PFN_vkCreateComputePipelines>(
load("vkCreateComputePipelines"));
out->cmd_dispatch =
reinterpret_cast<PFN_vkCmdDispatch>(load("vkCmdDispatch"));
out->create_fence =
reinterpret_cast<PFN_vkCreateFence>(load("vkCreateFence"));
out->destroy_fence =
@@ -215,7 +221,8 @@ inline auto GoldenVkLoad(LoaderFn loader, GoldenVkProcs* out) -> bool {
out->create_module != nullptr && out->create_pipes != nullptr &&
out->alloc_cmds != nullptr && out->begin_cmd != nullptr &&
out->queue_submit != nullptr && out->wait_fences != nullptr &&
out->create_pool != nullptr && out->cmd_begin_render != nullptr;
out->create_pool != nullptr && out->cmd_begin_render != nullptr &&
out->create_compute != nullptr && out->cmd_dispatch != nullptr;
return slots_ok;
}
@@ -230,6 +237,33 @@ struct GoldenImage {
VkImageView view{nullptr};
};
// Pick a memory type index satisfying req bits + property flags (first
// fit; 0xFFFFFFFFu when none). Shared by host + image allocators below
// (Sonar new-duplication gate: the pick loop repeats per allocator).
inline auto GoldenPickMemory(GoldenVk* g, std::uint32_t type_bits,
VkMemoryPropertyFlags flags) -> std::uint32_t {
VkPhysicalDeviceMemoryProperties mp{};
g->vk.get_mem_props(g->physical, &mp);
for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) {
if ((type_bits & (1u << i)) != 0u &&
(mp.memoryTypes[i].propertyFlags & flags) == flags) {
return i;
}
}
return 0xFFFFFFFFu;
}
// Allocate device memory for an already-created buffer/image.
inline auto GoldenAllocBind(GoldenVk* g, const VkMemoryRequirements& req,
std::uint32_t mem_index, VkDeviceMemory* out_mem)
-> bool {
VkMemoryAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
ai.allocationSize = req.size;
ai.memoryTypeIndex = mem_index;
return g->vk.alloc_mem(g->device, &ai, nullptr, out_mem) == VK_SUCCESS;
}
// Host-visible staging buffer (TRANSFER_SRC/DST use; no VMA — the P4
// goldens upload once and read back once per run).
inline auto GoldenAllocHost(GoldenVk* g, std::uint64_t bytes,
@@ -245,29 +279,11 @@ inline auto GoldenAllocHost(GoldenVk* g, std::uint64_t bytes,
}
VkMemoryRequirements req{};
g->vk.get_buffer_reqs(g->device, out->buf, &req);
VkPhysicalDeviceMemoryProperties mp{};
g->vk.get_mem_props(g->physical, &mp);
std::uint32_t mi = 0xFFFFFFFFu;
for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) {
if ((req.memoryTypeBits & (1u << i)) != 0u &&
(mp.memoryTypes[i].propertyFlags &
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0u &&
(mp.memoryTypes[i].propertyFlags &
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) != 0u) {
mi = i;
break;
}
}
if (mi == 0xFFFFFFFFu) {
g->vk.destroy_buffer(g->device, out->buf, nullptr);
out->buf = nullptr;
return false;
}
VkMemoryAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
ai.allocationSize = req.size;
ai.memoryTypeIndex = mi;
if (g->vk.alloc_mem(g->device, &ai, nullptr, &out->mem) != VK_SUCCESS) {
const std::uint32_t mi = GoldenPickMemory(
g, req.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
if (mi == 0xFFFFFFFFu ||
!GoldenAllocBind(g, req, mi, &out->mem)) {
g->vk.destroy_buffer(g->device, out->buf, nullptr);
out->buf = nullptr;
return false;
@@ -323,35 +339,13 @@ inline auto GoldenMakeImage(GoldenVk* g, VkFormat fmt, std::uint32_t w,
}
VkMemoryRequirements req{};
g->vk.get_image_reqs(g->device, out->img, &req);
VkPhysicalDeviceMemoryProperties mp{};
g->vk.get_mem_props(g->physical, &mp);
std::uint32_t mi = 0xFFFFFFFFu;
for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) {
if ((req.memoryTypeBits & (1u << i)) != 0u &&
(mp.memoryTypes[i].propertyFlags &
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0u) {
mi = i;
break;
}
}
std::uint32_t mi =
GoldenPickMemory(g, req.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
if (mi == 0xFFFFFFFFu) {
for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) {
if ((req.memoryTypeBits & (1u << i)) != 0u) {
mi = i;
break;
}
}
mi = GoldenPickMemory(g, req.memoryTypeBits, 0);
}
if (mi == 0xFFFFFFFFu) {
g->vk.destroy_image(g->device, out->img, nullptr);
out->img = nullptr;
return false;
}
VkMemoryAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
ai.allocationSize = req.size;
ai.memoryTypeIndex = mi;
if (g->vk.alloc_mem(g->device, &ai, nullptr, &out->mem) != VK_SUCCESS) {
if (mi == 0xFFFFFFFFu ||
!GoldenAllocBind(g, req, mi, &out->mem)) {
g->vk.destroy_image(g->device, out->img, nullptr);
out->img = nullptr;
return false;
@@ -387,6 +381,71 @@ inline void GoldenFreeImage(GoldenVk* g, GoldenImage* im) {
}
}
// Device-local cube-compatible RGBA32F image (6 layers, mip chain) WITHOUT
// a view (view creation is the TU's job: storage writes need 2D-array
// per-mip views, sampling needs a whole-chain CUBE view — one view
// cannot serve both). P4-05 skybox/IBL cubes share this builder; the
// import TU uses (edge, 1), the IBL TU (edge, mips). Pair with
// GoldenMakeCubeSampleView (whole-chain CUBE) and per-mip 2D-array views
// (see make_per_mip_view in test_skybox_ibl.cpp).
inline auto GoldenMakeCube(GoldenVk* g, std::uint32_t edge, std::uint32_t mips,
VkImageUsageFlags usage, GoldenImage* out) -> bool {
VkImageCreateInfo ii{};
ii.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
ii.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
ii.imageType = VK_IMAGE_TYPE_2D;
ii.format = VK_FORMAT_R32G32B32A32_SFLOAT;
ii.extent = {edge, edge, 1};
ii.mipLevels = mips;
ii.arrayLayers = 6;
ii.samples = VK_SAMPLE_COUNT_1_BIT;
ii.tiling = VK_IMAGE_TILING_OPTIMAL;
ii.usage = usage;
ii.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
ii.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
if (g->vk.create_image(g->device, &ii, nullptr, &out->img) != VK_SUCCESS) {
return false;
}
VkMemoryRequirements req{};
g->vk.get_image_reqs(g->device, out->img, &req);
const std::uint32_t mi = GoldenPickMemory(g, req.memoryTypeBits, 0);
if (mi == 0xFFFFFFFFu ||
!GoldenAllocBind(g, req, mi, &out->mem)) {
g->vk.destroy_image(g->device, out->img, nullptr);
out->img = nullptr;
return false;
}
if (g->vk.bind_image_mem(g->device, out->img, out->mem, 0) != VK_SUCCESS) {
g->vk.free_mem(g->device, out->mem, nullptr);
g->vk.destroy_image(g->device, out->img, nullptr);
out->img = nullptr;
out->mem = nullptr;
return false;
}
VkImageViewCreateInfo vi{};
vi.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
vi.image = out->img;
vi.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
vi.format = VK_FORMAT_R32G32B32A32_SFLOAT;
vi.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 6};
return g->vk.create_view(g->device, &vi, nullptr, &out->view) == VK_SUCCESS;
}
// Whole-chain CUBE sample view over a GoldenMakeCube image (mips levels).
// Sampling (irradiance/prefilter/skybox cubes in the shade set) needs the
// full chain; storage writes use per-mip 2D-array views instead.
inline auto GoldenMakeCubeSampleView(GoldenVk* g, VkImage img,
std::uint32_t mips, VkImageView* out)
-> bool {
VkImageViewCreateInfo vi{};
vi.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
vi.image = img;
vi.viewType = VK_IMAGE_VIEW_TYPE_CUBE;
vi.format = VK_FORMAT_R32G32B32A32_SFLOAT;
vi.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, mips, 0, 6};
return g->vk.create_view(g->device, &vi, nullptr, out) == VK_SUCCESS;
}
// One shader module from checked-in SPIR-V words.
inline auto GoldenMakeModule(GoldenVk* g, const std::uint32_t* words,
std::size_t n, VkShaderModule* out) -> bool {
@@ -397,6 +456,61 @@ inline auto GoldenMakeModule(GoldenVk* g, const std::uint32_t* words,
return g->vk.create_module(g->device, &sci, nullptr, out) == VK_SUCCESS;
}
// Compute set layout: binding 0 = cube sampler, 1 = storage image (shared
// by the P4-05 compute goldens; Sonar new-duplication gate).
inline auto GoldenMakeComputeSetLayout(GoldenVk* g,
VkDescriptorSetLayout* out) -> bool {
VkDescriptorSetLayoutBinding binds[2]{};
binds[0].binding = 0;
binds[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
binds[0].descriptorCount = 1;
binds[0].stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
binds[1].binding = 1;
binds[1].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
binds[1].descriptorCount = 1;
binds[1].stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
VkDescriptorSetLayoutCreateInfo li{};
li.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
li.bindingCount = 2;
li.pBindings = binds;
return g->vk.create_set_layout(g->device, &li, nullptr, out) == VK_SUCCESS;
}
// Allocate + begin a one-time primary command buffer (shared by the P4-05
// compute goldens; Sonar new-duplication gate).
inline auto GoldenBeginCmd(GoldenVk* g, VkCommandPool cmd_pool,
VkCommandBuffer* out_cb) -> bool {
VkCommandBufferAllocateInfo ab{};
ab.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
ab.commandPool = cmd_pool;
ab.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
ab.commandBufferCount = 1;
if (g->vk.alloc_cmds(g->device, &ab, out_cb) != VK_SUCCESS) {
return false;
}
VkCommandBufferBeginInfo bi{};
bi.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
bi.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
return g->vk.begin_cmd(*out_cb, &bi) == VK_SUCCESS;
}
// Host-readback barrier + end: orders COPY writes before the host read
// (shared by the P4-05 compute goldens; Sonar new-duplication gate).
inline auto GoldenEndReadback(GoldenVk* g, VkCommandBuffer cb) -> bool {
VkMemoryBarrier2 hb{};
hb.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2;
hb.srcStageMask = VK_PIPELINE_STAGE_2_COPY_BIT;
hb.srcAccessMask = VK_ACCESS_2_TRANSFER_WRITE_BIT;
hb.dstStageMask = VK_PIPELINE_STAGE_2_HOST_BIT;
hb.dstAccessMask = VK_ACCESS_2_HOST_READ_BIT;
VkDependencyInfo dh{};
dh.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO;
dh.memoryBarrierCount = 1;
dh.pMemoryBarriers = &hb;
g->vk.cmd_barrier2(cb, &dh);
return g->vk.end_cmd(cb) == VK_SUCCESS;
}
// Transition `img` old->new with explicit stage/access masks (sync2).
inline void GoldenBarrier(GoldenVk* g, VkCommandBuffer cb, VkImage img,
VkImageLayout old_layout, VkImageLayout new_layout,
@@ -1158,8 +1272,47 @@ inline auto GoldenOpenDevice(
return true;
}
// Lightweight device open for compute-only P4 golden TUs (no PBR plan /
// bindless): init VulkanDevice, fill GoldenVk handles, run GoldenVkLoad,
// wire failures through check(). The missing-GPU branch reports via
// missing() (fail-closed under ENGINE_REQUIRE_GPU=1) and returns false —
// the TU returns 1. The TU keeps its extra compute-proc gate (procs differ
// per TU); this helper owns the repeated device+loader+vkload preamble
// (Sonar new-duplication gate).
template <typename CheckFn, typename MissingFn, typename DeviceT>
inline auto GoldenOpenComputeDevice(CheckFn check, MissingFn missing,
const char* app_name,
const char* label_missing,
const char* label_device,
const char* label_procs, DeviceT* dev,
engine::test::GoldenVk* g) -> bool {
engine::renderer::DeviceCreateInfo ci{};
ci.app_name = app_name;
ci.device_hint = "llvmpipe";
const auto st = dev->init(ci);
if (!st.ok() &&
st.code == engine::renderer::StatusCode::kNoPhysicalDevice) {
missing(label_missing);
return false;
}
check(st.ok(), label_device);
if (!st.ok()) {
return false;
}
g->device = dev->device();
g->physical = dev->physical_device();
g->queue = dev->graphics_queue();
g->queue_family = dev->graphics_queue_family();
auto loader = [&](const char* name) -> void* {
void* p = dev->proc(name);
return (p != nullptr) ? p : dev->instance_proc(name);
};
const bool vk_ok = engine::test::GoldenVkLoad(loader, &g->vk);
check(vk_ok, label_procs);
return vk_ok;
}
// Shared vis-image upload trio (the R32G32_UINT vis + SFLOAT HDR pair
// repeat per golden; the usage flags + formats are the cross-TU mirror,
// Sonar new-duplication gate). LDR image fill stays per TU (formats
// differ: R8G8B8A8 vs engine HDR constants).
template <typename CheckFn>
+589
View File
@@ -0,0 +1,589 @@
// test_brdf_lut.cpp — P4-05 split-sum BRDF LUT (Karis) generation.
//
// CPU contract (no GPU): BrdfLutValidateImport plans, BrdfLutTexelInputs
// centers, BrdfHammersley/VdC determinism, and the reference curve:
// scale rises monotonically with NdotV at low roughness, stays in
// [0, 1], bias stays small and peaks at grazing angles; full-rough
// scale decreases with NdotV (energy-conserving rough response).
// Null-safety throughout.
//
// GPU section: the checked-in brdf_lut compute shader generates a 64px
// RG32F LUT (test size — the 512 spec edge is import-time); every texel
// is compared against BrdfLutReference within a CPU/GPU float tolerance.
// [FAIL] (not [SKIP]) under ENGINE_REQUIRE_GPU=1 (rule 11 / P1-01).
#include <array>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <vector>
#if defined(ENGINE_RENDERER_HAS_VULKAN)
#define VK_NO_PROTOTYPES
#include <vulkan/vulkan.h>
#endif
#include "engine/renderer/brdf_lut.hpp"
#include "engine/renderer/vulkan_device.hpp"
#if defined(ENGINE_RENDERER_HAS_VULKAN)
#include "engine/renderer/bindless_table.hpp"
#include "engine/renderer/pbr_pipeline.hpp"
#include "engine/renderer/shaders/brdf_lut_spv.inc"
// Established golden-TU pattern (test_skybox_import.cpp): the shared
// helpers need the six PBR SPIR-V symbols + engine types, so include
// all six blobs before golden_vk_helper.hpp.
#include "engine/renderer/shaders/pbr_shade_frag_spv.inc"
#include "engine/renderer/shaders/pbr_shade_vert_spv.inc"
#include "engine/renderer/shaders/pbr_vis_frag_spv.inc"
#include "engine/renderer/shaders/pbr_vis_vert_spv.inc"
#include "engine/renderer/shaders/post_frag_spv.inc"
#include "engine/renderer/shaders/post_vert_spv.inc"
#include "golden_vk_helper.hpp"
#endif
namespace {
auto failures = 0;
void check(bool ok, const char* name) {
std::printf("[%s] %s\n", ok ? "PASS" : "FAIL", name);
if (!ok) {
++failures;
}
}
// --- CPU contract ----------------------------------------------------------
void test_cpu_validate() {
using engine::renderer::BrdfLutImportParams;
using engine::renderer::BrdfLutImportPlan;
using engine::renderer::kBrdfLutSize;
BrdfLutImportPlan plan{};
BrdfLutImportParams def{};
def.lut_size = 0;
check(BrdfLutValidateImport(def, &plan), "brdf: default plan ok");
check(plan.lut_size == kBrdfLutSize, "brdf: default edge 512");
check(plan.lut_bytes == static_cast<std::uint64_t>(512) * 512 * 8,
"brdf: bytes 512^2*8");
BrdfLutImportParams small{};
small.lut_size = 64;
check(BrdfLutValidateImport(small, &plan) && plan.lut_size == 64,
"brdf: custom edge 64");
check(!BrdfLutValidateImport(def, nullptr), "brdf: null out rejected");
BrdfLutImportParams tiny{};
tiny.lut_size = 8;
check(!BrdfLutValidateImport(tiny, &plan), "brdf: edge 8 rejected");
BrdfLutImportParams huge{};
huge.lut_size = 4096;
check(!BrdfLutValidateImport(huge, &plan), "brdf: edge 4096 rejected");
}
void test_cpu_hammersley() {
using engine::renderer::BrdfHammersley;
using engine::renderer::BrdfRadicalInverseVdC;
// VdC(0)=0, VdC(1)=0.5, VdC(2)=0.25 — the canonical sequence start.
check(BrdfRadicalInverseVdC(0) == 0.0F, "brdf: vdc(0)=0");
check(std::fabs(BrdfRadicalInverseVdC(1) - 0.5F) < 1e-7F, "brdf: vdc(1)=1/2");
check(std::fabs(BrdfRadicalInverseVdC(2) - 0.25F) < 1e-7F,
"brdf: vdc(2)=1/4");
float u0 = -1.0F;
float v0 = -1.0F;
BrdfHammersley(0, 1024, &u0, &v0);
check(u0 == 0.0F && v0 == 0.0F, "brdf: hammersley(0)=(0,0)");
float u1 = -1.0F;
float v1 = -1.0F;
BrdfHammersley(512, 1024, &u1, &v1);
// u hits 1/2 exactly; v is VdC(512) = 2^-10 (bit 9 set -> 2^-10).
check(std::fabs(u1 - 0.5F) < 1e-7F && std::fabs(v1 - 0.0009765625F) < 1e-9F,
"brdf: hammersley(512)=(1/2,2^-10)");
}
void test_cpu_texel_inputs() {
using engine::renderer::BrdfLutTexelInputs;
float ndv = 0.0F;
float rough = 0.0F;
check(BrdfLutTexelInputs(0, 0, 512, &ndv, &rough), "brdf: texel(0,0) ok");
const float half = 0.5F / 512.0F;
check(std::fabs(ndv - half) < 1e-7F && std::fabs(rough - half) < 1e-7F,
"brdf: texel(0,0) is half-texel");
check(BrdfLutTexelInputs(511, 511, 512, &ndv, &rough),
"brdf: texel(511,511) ok");
check(std::fabs(ndv - (1.0F - half)) < 1e-6F &&
std::fabs(rough - (1.0F - half)) < 1e-6F,
"brdf: texel(511,511) near 1");
check(!BrdfLutTexelInputs(0, 0, 0, &ndv, &rough), "brdf: size 0 rejected");
check(!BrdfLutTexelInputs(0, 0, 512, nullptr, &rough),
"brdf: null ndv rejected");
}
void test_cpu_reference_curve() {
using engine::renderer::BrdfIntegrate;
using engine::renderer::BrdfLutReference;
// Smooth dielectric (rough 0.05): scale rises monotonically with NdotV,
// stays in [0, 1]; bias small, peaking at grazing.
constexpr std::array<float, 5> kNdvs = {0.02F, 0.25F, 0.5F, 0.75F, 0.98F};
std::array<float, 5> scales{};
std::array<float, 5> biases{};
bool finite_ok = true;
for (std::size_t i = 0; i < kNdvs.size(); ++i) {
BrdfIntegrate(kNdvs[i], 0.05F, 1024, &scales[i], &biases[i]);
if (!std::isfinite(scales[i]) || !std::isfinite(biases[i])) {
finite_ok = false;
}
}
check(finite_ok, "brdf: smooth curve finite");
bool mono_ok = true;
for (std::size_t i = 1; i < kNdvs.size(); ++i) {
if (scales[i] < scales[i - 1] - 1e-3F) {
mono_ok = false;
}
}
check(mono_ok, "brdf: smooth scale monotonic in ndv");
bool range_ok = true;
for (std::size_t i = 0; i < kNdvs.size(); ++i) {
if (scales[i] < -1e-3F || scales[i] > 1.0F + 1e-3F || biases[i] < -1e-3F ||
biases[i] > 0.5F) {
range_ok = false;
}
}
check(range_ok, "brdf: smooth curve in range");
// Edge values sane: near-normal smooth dielectric is ~1 scale, ~0 bias
// (the analytic limit); grazing keeps most energy in bias.
check(scales[4] > 0.95F && biases[4] < 0.01F, "brdf: ndv~1 smooth ~ (1, 0)");
check(biases[0] > biases[4], "brdf: bias peaks at grazing");
// Mid-rough still monotonic-ish and bounded (the perceptual core of the
// split-sum: rough response falls as NdotV rises at full roughness).
float rough_hi = 0.0F;
float rough_lo = 0.0F;
float dummy = 0.0F;
BrdfIntegrate(0.98F, 0.95F, 1024, &rough_hi, &dummy);
BrdfIntegrate(0.02F, 0.95F, 1024, &rough_lo, &dummy);
check(rough_lo > rough_hi, "brdf: full-rough scale falls with ndv");
// LUT entry point agrees with direct integration at a fixed texel.
float s0 = 0.0F;
float b0 = 0.0F;
float s1 = 0.0F;
float b1 = 0.0F;
check(BrdfLutReference(384, 25, 512, &s0, &b0), "brdf: lut ref ok");
BrdfIntegrate((384.0F + 0.5F) / 512.0F, (25.0F + 0.5F) / 512.0F, 1024, &s1,
&b1);
check(std::fabs(s0 - s1) < 1e-6F && std::fabs(b0 - b1) < 1e-6F,
"brdf: lut ref matches integrate");
check(!BrdfLutReference(0, 0, 512, nullptr, &b1), "brdf: null scale out");
}
void test_cpu() {
test_cpu_validate();
test_cpu_hammersley();
test_cpu_texel_inputs();
test_cpu_reference_curve();
}
#if defined(ENGINE_RENDERER_HAS_VULKAN)
// Extra compute entry points the shared GoldenVkProcs table lacks.
struct BrdfComputeVk {
PFN_vkCreateComputePipelines create_comp{nullptr};
PFN_vkDestroyPipeline destroy_pipe{nullptr};
PFN_vkCmdBindPipeline cmd_bind_pipe{nullptr};
PFN_vkCmdBindDescriptorSets cmd_bind_sets{nullptr};
PFN_vkCmdPushConstants cmd_push{nullptr};
PFN_vkCmdDispatch cmd_dispatch{nullptr};
};
template <typename Loader>
void load_brdf_compute_procs(Loader loader, BrdfComputeVk* p) {
auto load = [&](const char* name) { return loader(name); };
p->create_comp = reinterpret_cast<PFN_vkCreateComputePipelines>(
load("vkCreateComputePipelines"));
p->destroy_pipe =
reinterpret_cast<PFN_vkDestroyPipeline>(load("vkDestroyPipeline"));
p->cmd_bind_pipe =
reinterpret_cast<PFN_vkCmdBindPipeline>(load("vkCmdBindPipeline"));
p->cmd_bind_sets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(
load("vkCmdBindDescriptorSets"));
p->cmd_push =
reinterpret_cast<PFN_vkCmdPushConstants>(load("vkCmdPushConstants"));
p->cmd_dispatch = reinterpret_cast<PFN_vkCmdDispatch>(load("vkCmdDispatch"));
}
auto brdf_gpu_missing(std::string_view what) -> int {
failures += engine::test::GoldenGpuMissing(what);
return 1;
}
auto test_gpu() -> int {
using engine::renderer::VulkanDevice;
constexpr std::uint32_t kLut = 64;
VulkanDevice dev;
engine::test::GoldenVk g{};
const bool vk_ok = engine::test::GoldenOpenComputeDevice(
check, brdf_gpu_missing, "P4-05-brdf-lut", "brdf-lut-gpu: no physical device",
"brdf-lut-gpu: device init ok", "brdf-lut-gpu: entry points resolve",
&dev, &g);
if (!vk_ok) {
return 1;
}
auto loader = [&](const char* name) -> void* {
void* p = dev.proc(name);
return (p != nullptr) ? p : dev.instance_proc(name);
};
BrdfComputeVk bv{};
load_brdf_compute_procs(loader, &bv);
const bool comp_ok = g.vk.create_compute != nullptr &&
bv.destroy_pipe != nullptr &&
bv.cmd_bind_pipe != nullptr &&
g.vk.cmd_dispatch != nullptr &&
bv.cmd_bind_sets != nullptr && bv.cmd_push != nullptr;
check(comp_ok, "brdf-lut-gpu: compute procs resolve");
if (!vk_ok || !comp_ok) {
return 1;
}
// Sonar S2259: the early return above proves all procedure pointers are
// non-null on every path past this point; assert so the analyzer sees it.
assert(vk_ok && comp_ok);
assert(g.vk.create_compute != nullptr && bv.destroy_pipe != nullptr &&
bv.cmd_bind_pipe != nullptr && bv.cmd_bind_sets != nullptr &&
bv.cmd_push != nullptr && g.vk.cmd_dispatch != nullptr);
// SPIR-V magic + version (checked-in blob sanity, like slang blobs).
check(kBrdf_lutSpv[0] == 0x07230203u, "brdf-lut-gpu: spv magic");
check(kBrdf_lutSpv[1] >= 0x00010300u, "brdf-lut-gpu: spv >= 1.3");
// RG32F storage LUT image (STORAGE + SRC for readback).
engine::test::GoldenHostBuf read_b{};
engine::test::GoldenImage lut_img{};
VkDescriptorSetLayout set_layout = nullptr;
VkPipelineLayout pipe_layout = nullptr;
VkDescriptorPool pool = nullptr;
VkDescriptorSet set = nullptr;
VkPipeline pipe = nullptr;
VkShaderModule mod = nullptr;
const std::uint64_t lut_bytes = static_cast<std::uint64_t>(kLut) * kLut * 8;
bool ok = engine::test::GoldenAllocHost(
&g, lut_bytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT, &read_b);
check(ok, "brdf-lut-gpu: staging buffer");
if (ok) {
VkImageCreateInfo ii{};
ii.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
ii.imageType = VK_IMAGE_TYPE_2D;
ii.format = VK_FORMAT_R32G32_SFLOAT;
ii.extent = {kLut, kLut, 1};
ii.mipLevels = 1;
ii.arrayLayers = 1;
ii.samples = VK_SAMPLE_COUNT_1_BIT;
ii.tiling = VK_IMAGE_TILING_OPTIMAL;
ii.usage = VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
ii.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
ii.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
ok = g.vk.create_image(g.device, &ii, nullptr, &lut_img.img) == VK_SUCCESS;
if (ok) {
VkMemoryRequirements req{};
g.vk.get_image_reqs(g.device, lut_img.img, &req);
VkPhysicalDeviceMemoryProperties mp{};
g.vk.get_mem_props(g.physical, &mp);
std::uint32_t mi = 0xFFFFFFFFu;
for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) {
if ((req.memoryTypeBits & (1u << i)) != 0u) {
mi = i;
break;
}
}
ok = mi != 0xFFFFFFFFu;
if (ok) {
VkMemoryAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
ai.allocationSize = req.size;
ai.memoryTypeIndex = mi;
ok = g.vk.alloc_mem(g.device, &ai, nullptr, &lut_img.mem) == VK_SUCCESS;
}
if (ok) {
ok = g.vk.bind_image_mem(g.device, lut_img.img, lut_img.mem, 0) ==
VK_SUCCESS;
}
if (ok) {
VkImageViewCreateInfo vi{};
vi.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
vi.image = lut_img.img;
vi.viewType = VK_IMAGE_VIEW_TYPE_2D;
vi.format = VK_FORMAT_R32G32_SFLOAT;
vi.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
ok = g.vk.create_view(g.device, &vi, nullptr, &lut_img.view) ==
VK_SUCCESS;
}
}
check(ok, "brdf-lut-gpu: RG32F storage image");
}
// Set layout: binding 1 = storage image (mirrors the shader; the
// sibling IBL task's sampled LUT view binds at slot 6 of the PBR set).
if (ok) {
VkDescriptorSetLayoutBinding bind{};
bind.binding = 1;
bind.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
bind.descriptorCount = 1;
bind.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
VkDescriptorSetLayoutCreateInfo li{};
li.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
li.bindingCount = 1;
li.pBindings = &bind;
ok = g.vk.create_set_layout(g.device, &li, nullptr, &set_layout) ==
VK_SUCCESS;
check(ok, "brdf-lut-gpu: set layout");
}
if (ok) {
VkPushConstantRange pc{};
pc.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
pc.size = 4;
VkPipelineLayoutCreateInfo pli{};
pli.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
pli.setLayoutCount = 1;
pli.pSetLayouts = &set_layout;
pli.pushConstantRangeCount = 1;
pli.pPushConstantRanges = &pc;
ok = g.vk.create_pipe_layout(g.device, &pli, nullptr, &pipe_layout) ==
VK_SUCCESS;
check(ok, "brdf-lut-gpu: pipeline layout");
}
if (ok) {
ok = engine::test::GoldenMakeModule(&g, kBrdf_lutSpv, kBrdf_lutSpvWords,
&mod);
check(ok, "brdf-lut-gpu: compute module");
}
if (ok) {
VkComputePipelineCreateInfo cpi{};
cpi.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpi.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
cpi.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
cpi.stage.module = mod;
cpi.stage.pName = "main";
cpi.layout = pipe_layout;
ok = g.vk.create_compute(g.device, nullptr, 1, &cpi, nullptr, &pipe) ==
VK_SUCCESS;
check(ok, "brdf-lut-gpu: compute pipeline");
}
if (ok) {
VkDescriptorPoolSize size{};
size.type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
size.descriptorCount = 1;
VkDescriptorPoolCreateInfo pi{};
pi.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
pi.maxSets = 1;
pi.poolSizeCount = 1;
pi.pPoolSizes = &size;
if (g.vk.create_pool(g.device, &pi, nullptr, &pool) != VK_SUCCESS) {
ok = false;
} else {
VkDescriptorSetAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
ai.descriptorPool = pool;
ai.descriptorSetCount = 1;
ai.pSetLayouts = &set_layout;
ok = g.vk.alloc_sets(g.device, &ai, &set) == VK_SUCCESS;
}
check(ok, "brdf-lut-gpu: descriptor set");
}
if (ok) {
VkDescriptorImageInfo stor_info{};
stor_info.imageView = lut_img.view;
stor_info.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
VkWriteDescriptorSet write{};
write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
write.dstSet = set;
write.dstBinding = 1;
write.descriptorCount = 1;
write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
write.pImageInfo = &stor_info;
g.vk.update_sets(g.device, 1, &write, 0, nullptr);
check(true, "brdf-lut-gpu: descriptors written");
}
// Record: dispatch (lut/16, lut/16, 1), read back.
if (ok) {
VkCommandPool cmd_pool = nullptr;
VkCommandBuffer cb = nullptr;
VkCommandPoolCreateInfo cpi{};
cpi.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
cpi.queueFamilyIndex = g.queue_family;
ok = g.vk.create_cmd_pool(g.device, &cpi, nullptr, &cmd_pool) == VK_SUCCESS;
if (ok) {
VkCommandBufferAllocateInfo ab{};
ab.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
ab.commandPool = cmd_pool;
ab.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
ab.commandBufferCount = 1;
ok = g.vk.alloc_cmds(g.device, &ab, &cb) == VK_SUCCESS;
}
if (ok) {
VkCommandBufferBeginInfo bi{};
bi.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
bi.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
ok = g.vk.begin_cmd(cb, &bi) == VK_SUCCESS;
}
auto barrier_img = [&](VkImage img, VkImageLayout old_l, VkImageLayout new_l,
VkPipelineStageFlags2 src_s, VkAccessFlags2 src_a,
VkPipelineStageFlags2 dst_s, VkAccessFlags2 dst_a) {
VkImageMemoryBarrier2 b{};
b.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2;
b.srcStageMask = src_s;
b.srcAccessMask = src_a;
b.dstStageMask = dst_s;
b.dstAccessMask = dst_a;
b.oldLayout = old_l;
b.newLayout = new_l;
b.image = img;
b.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
VkDependencyInfo d{};
d.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO;
d.imageMemoryBarrierCount = 1;
d.pImageMemoryBarriers = &b;
g.vk.cmd_barrier2(cb, &d);
};
if (ok) {
barrier_img(lut_img.img, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL,
0, 0, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT);
bv.cmd_bind_pipe(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipe);
bv.cmd_bind_sets(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipe_layout, 0, 1,
&set, 0, nullptr);
bv.cmd_push(cb, pipe_layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, 4, &kLut);
g.vk.cmd_dispatch(cb, kLut / 16, kLut / 16, 1);
barrier_img(lut_img.img, VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT,
VK_PIPELINE_STAGE_2_COPY_BIT, VK_ACCESS_2_TRANSFER_READ_BIT);
VkBufferImageCopy rl{};
rl.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
rl.imageExtent = {kLut, kLut, 1};
g.vk.cmd_copy_img_buf(cb, lut_img.img, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
read_b.buf, 1, &rl);
VkMemoryBarrier2 hb{};
hb.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2;
hb.srcStageMask = VK_PIPELINE_STAGE_2_COPY_BIT;
hb.srcAccessMask = VK_ACCESS_2_TRANSFER_WRITE_BIT;
hb.dstStageMask = VK_PIPELINE_STAGE_2_HOST_BIT;
hb.dstAccessMask = VK_ACCESS_2_HOST_READ_BIT;
VkDependencyInfo dh{};
dh.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO;
dh.memoryBarrierCount = 1;
dh.pMemoryBarriers = &hb;
g.vk.cmd_barrier2(cb, &dh);
ok = g.vk.end_cmd(cb) == VK_SUCCESS;
}
check(ok, "brdf-lut-gpu: frame recorded");
if (ok) {
ok = engine::test::GoldenSubmitWait(&g, cb);
check(ok, "brdf-lut-gpu: submit + fence wait");
}
if (cmd_pool != nullptr) {
g.vk.destroy_cmd_pool(g.device, cmd_pool, nullptr);
}
}
// Readback: every texel vs CPU reference (CPU/GPU float tolerance).
if (ok) {
void* p = nullptr;
ok = g.vk.map_mem(g.device, read_b.mem, 0, lut_bytes, 0, &p) == VK_SUCCESS &&
p != nullptr;
check(ok, "brdf-lut-gpu: readback mapped");
if (ok) {
const auto* f = static_cast<const float*>(p);
std::uint32_t bad = 0;
std::uint32_t nan_ct = 0;
float worst = 0.0F;
std::uint32_t worst_x = 0;
std::uint32_t worst_y = 0;
int worst_c = 0;
for (std::uint32_t y = 0; y < kLut; ++y) {
for (std::uint32_t x = 0; x < kLut; ++x) {
float want_s = 0.0F;
float want_b = 0.0F;
if (!engine::renderer::BrdfLutReference(x, y, kLut, &want_s, &want_b)) {
++bad;
continue;
}
const std::size_t i =
(static_cast<std::size_t>(y) * kLut + x) * 2;
const float want[2] = {want_s, want_b};
for (int c = 0; c < 2; ++c) {
const float got = f[i + static_cast<std::size_t>(c)];
if (!std::isfinite(got)) {
++nan_ct;
continue;
}
const float dd = std::fabs(got - want[c]);
if (dd > worst) {
worst = dd;
worst_x = x;
worst_y = y;
worst_c = c;
}
if (dd > 2e-3F) {
++bad;
if (bad <= 5) {
std::printf(
"[INFO] brdf-lut-gpu: mismatch x=%u y=%u c=%d "
"got=%.4f want=%.4f\n",
x, y, c, static_cast<double>(got),
static_cast<double>(want[c]));
}
}
}
}
}
std::printf("[INFO] brdf-lut-gpu: worst abs diff %.6f, bad=%u nan=%u\n",
static_cast<double>(worst), bad, nan_ct);
std::printf("[INFO] brdf-lut-gpu: worst at x=%u y=%u c=%d\n", worst_x,
worst_y, worst_c);
check(bad == 0 && nan_ct == 0, "brdf-lut-gpu: lut matches CPU ref");
// Spot edge value: near-normal smooth corner texel (x=62, y=0:
// ndv~0.977, rough~0.008) is ~(0.994, ~0) — proves the GPU path
// reproduces the analytic smooth-normal limit (scale~1, bias~0).
const std::size_t ei =
(static_cast<std::size_t>(0) * kLut + 62) * 2;
check(f[ei] > 0.98F && f[ei + 1] < 0.01F,
"brdf-lut-gpu: smooth normal edge sane");
g.vk.unmap_mem(g.device, read_b.mem);
}
}
if (pipe != nullptr) {
bv.destroy_pipe(g.device, pipe, nullptr);
}
if (mod != nullptr) {
g.vk.destroy_module(g.device, mod, nullptr);
}
if (set_layout != nullptr) {
g.vk.destroy_set_layout(g.device, set_layout, nullptr);
}
if (pipe_layout != nullptr) {
g.vk.destroy_pipe_layout(g.device, pipe_layout, nullptr);
}
if (pool != nullptr) {
g.vk.destroy_pool(g.device, pool, nullptr);
}
engine::test::GoldenFreeImage(&g, &lut_img);
engine::test::GoldenFreeHost(&g, &read_b);
dev.shutdown();
return 0;
}
#endif
} // namespace
auto main() -> int {
test_cpu();
#if defined(ENGINE_RENDERER_HAS_VULKAN)
test_gpu();
#else
std::printf("[SKIP] brdf-lut-gpu: SDK absent (stub build)\n");
#endif
std::printf(failures == 0 ? "test_brdf_lut: all checks passed\n"
: "test_brdf_lut: %d FAILED\n",
failures);
return failures == 0 ? 0 : 1;
}
File diff suppressed because it is too large. Load diff
+728
View File
@@ -0,0 +1,728 @@
// test_skybox_import.cpp — P4-05 equirect HDR import + cubemap conversion.
//
// CPU contract (no GPU; runs on stub builds too): SkyboxValidateImport
// plans, SkyboxFaceDir face centers + edge continuity, SkyboxDirToUv
// wrap, SkyboxSampleEquirectCpu bilinear + null-safety, and an HDR
// decode probe through the REAL stb decoder (stbi_loadf_from_memory on
// a synthetic 2x2 flat Radiance .hdr — the same decoder the M5-01
// texture pipeline uses, so "HDR loads" is proven, not assumed).
//
// GPU section: the checked-in equirect_to_cube compute shader converts
// a synthetic 64x32 float equirect (red channel up to 4.0, proving the
// HDR range survives) into a 6-layer 64px RGBA32F cubemap; every texel
// is compared against the CPU reference (SkyboxFaceDir +
// SkyboxSampleEquirectCpu) within a hardware-filter tolerance.
// [FAIL] (not [SKIP]) under ENGINE_REQUIRE_GPU=1 (rule 11 / P1-01).
#include <array>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#if defined(ENGINE_RENDERER_HAS_VULKAN)
#define VK_NO_PROTOTYPES
#include <vulkan/vulkan.h>
#endif
#include "engine/renderer/skybox_image_based_lighting.hpp"
#include "engine/renderer/vulkan_device.hpp"
#if defined(ENGINE_ASSETS_HAS_STB)
#include "stb_image.h"
#endif
#if defined(ENGINE_RENDERER_HAS_VULKAN)
#include "engine/renderer/bindless_table.hpp"
#include "engine/renderer/pbr_pipeline.hpp"
#include "engine/renderer/vulkan_device.hpp"
#include "engine/renderer/shaders/equirect_to_cube_spv.inc"
// Established golden-TU pattern (test_hdr_tonemap.cpp): the shared
// helpers need the six PBR SPIR-V symbols + engine types, so include
// all six blobs before golden_vk_helper.hpp. This TU only *runs* the
// equirect compute shader, but the helper's GoldenOpenDevice is never
// called here (device opens inline below, no bindless plan needed).
#include "engine/renderer/shaders/pbr_shade_frag_spv.inc"
#include "engine/renderer/shaders/pbr_shade_vert_spv.inc"
#include "engine/renderer/shaders/pbr_vis_frag_spv.inc"
#include "engine/renderer/shaders/pbr_vis_vert_spv.inc"
#include "engine/renderer/shaders/post_frag_spv.inc"
#include "engine/renderer/shaders/post_vert_spv.inc"
#include "golden_vk_helper.hpp"
#endif
namespace {
auto failures = 0;
void check(bool ok, const char* name) {
std::printf("[%s] %s\n", ok ? "PASS" : "FAIL", name);
if (!ok) {
++failures;
}
}
// --- CPU contract ---------------------------------------------------------
void test_cpu_validate() {
using engine::renderer::SkyboxImportParams;
using engine::renderer::SkyboxImportPlan;
using engine::renderer::kSkyboxCubemapSize;
using engine::renderer::kSkyboxFaceCount;
SkyboxImportPlan plan{};
SkyboxImportParams good{0, 1024, 512};
check(SkyboxValidateImport(good, &plan), "sky: default plan ok");
check(plan.face_size == kSkyboxCubemapSize, "sky: default face 512");
check(plan.layer_count == kSkyboxFaceCount, "sky: 6 layers");
check(plan.face_bytes == static_cast<std::uint64_t>(512) * 512 * 16,
"sky: face bytes 512^2*16");
SkyboxImportParams small{64, 128, 64};
check(SkyboxValidateImport(small, &plan) && plan.face_size == 64,
"sky: custom face 64");
check(!SkyboxValidateImport(good, nullptr), "sky: null out rejected");
SkyboxImportParams zero_eq{0, 0, 512};
check(!SkyboxValidateImport(zero_eq, &plan), "sky: zero equirect rejected");
SkyboxImportParams tiny{8, 128, 64};
check(!SkyboxValidateImport(tiny, &plan), "sky: face 8 rejected");
SkyboxImportParams huge{4096, 128, 64};
check(!SkyboxValidateImport(huge, &plan), "sky: face 4096 rejected");
}
void test_cpu_face_dir() {
using engine::renderer::SkyboxFaceDir;
// Face centers map to the six axis directions (size 1 -> single texel
// at center of each face).
const float want[6][3] = {
{1.0F, 0.0F, 0.0F}, // +X
{-1.0F, 0.0F, 0.0F}, // -X
{0.0F, 1.0F, 0.0F}, // +Y
{0.0F, -1.0F, 0.0F}, // -Y
{0.0F, 0.0F, 1.0F}, // +Z
{0.0F, 0.0F, -1.0F}, // -Z
};
bool centers_ok = true;
for (std::uint32_t f = 0; f < 6; ++f) {
float d[3] = {0.0F, 0.0F, 0.0F};
if (!SkyboxFaceDir(f, 0, 0, 1, d)) {
centers_ok = false;
break;
}
for (int c = 0; c < 3; ++c) {
if (std::fabs(d[c] - want[f][c]) > 1e-5F) {
centers_ok = false;
}
}
}
check(centers_ok, "sky: face centers are axis dirs");
// Edge continuity: the right edge of +X meets the left edge of -Z
// (+X: z = -u, so x=max borders -Z; -Z: x-dir = -u, so x=0 borders
// +X). Adjacent faces share directions along the seam.
float a[3] = {0.0F, 0.0F, 0.0F};
float b[3] = {0.0F, 0.0F, 0.0F};
const std::uint32_t n = 64;
bool seam_ok = SkyboxFaceDir(0, n - 1, n / 2, n, a) &&
SkyboxFaceDir(5, 0, n / 2, n, b);
if (seam_ok) {
// Both edge texels sit on the +X/-Z diagonal; their normalized dirs
// must agree closely (same edge, half-texel offset only).
float dot = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
seam_ok = dot > 0.999F;
}
check(seam_ok, "sky: +X/-Z seam continuous");
// Rejections.
float d[3] = {0.0F, 0.0F, 0.0F};
check(!SkyboxFaceDir(6, 0, 0, 64, d), "sky: face 6 rejected");
check(!SkyboxFaceDir(0, 0, 0, 0, d), "sky: size 0 rejected");
check(!SkyboxFaceDir(0, 0, 0, 64, nullptr), "sky: null out rejected");
// Unit length on a sweep.
bool unit_ok = true;
for (std::uint32_t f = 0; f < 6 && unit_ok; ++f) {
for (std::uint32_t k = 0; k < 16 && unit_ok; ++k) {
float v[3] = {0.0F, 0.0F, 0.0F};
if (!SkyboxFaceDir(f, (k * 37) % 64, (k * 53) % 64, 64, v)) {
unit_ok = false;
break;
}
const float len = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
if (std::fabs(len - 1.0F) > 1e-5F) {
unit_ok = false;
}
}
}
check(unit_ok, "sky: dirs unit length");
}
void test_cpu_sample() {
using engine::renderer::SkyboxDirToUv;
using engine::renderer::SkyboxSampleEquirectCpu;
// 4x2 constant-color equirect: any direction samples the color.
const std::array<float, 4 * 2 * 4> px = [] {
std::array<float, 4 * 2 * 4> p{};
for (std::size_t i = 0; i < 8; ++i) {
p[i * 4 + 0] = 2.0F; // HDR red > 1
p[i * 4 + 1] = 0.5F;
p[i * 4 + 2] = 0.25F;
p[i * 4 + 3] = 1.0F;
}
return p;
}();
const float dirs[4][3] = {
{1.0F, 0.0F, 0.0F}, {0.0F, 1.0F, 0.0F}, {0.0F, 0.0F, 1.0F}, {0.0F, 0.0F, -1.0F}};
bool flat_ok = true;
for (const auto& d : dirs) {
float o[3] = {0.0F, 0.0F, 0.0F};
if (!SkyboxSampleEquirectCpu(px.data(), 4, 2, d, o)) {
flat_ok = false;
break;
}
if (std::fabs(o[0] - 2.0F) > 1e-5F || std::fabs(o[1] - 0.5F) > 1e-5F ||
std::fabs(o[2] - 0.25F) > 1e-5F) {
flat_ok = false;
}
}
check(flat_ok, "sky: flat equirect samples constant");
// UV wrap: +X and -X-adjacent longitudes agree across the seam.
float u0 = 0.0F;
float u1 = 0.0F;
float v0 = 0.0F;
float v1 = 0.0F;
SkyboxDirToUv(1.0F, 0.0F, 0.0F, &u0, &v0);
SkyboxDirToUv(-1.0F, 0.0F, 0.0F, &u1, &v1);
check(u0 >= 0.0F && u0 < 1.0F && u1 >= 0.0F && u1 < 1.0F,
"sky: uv in range");
check(std::fabs(u0 - 0.75F) < 1e-5F, "sky: +X maps u=0.75");
check(std::fabs(u1 - 0.25F) < 1e-5F, "sky: -X maps u=0.25");
// Null-safety.
float o[3] = {0.0F, 0.0F, 0.0F};
const float d[3] = {0.0F, 0.0F, 1.0F};
check(!SkyboxSampleEquirectCpu(nullptr, 4, 2, d, o), "sky: null px rejected");
check(!SkyboxSampleEquirectCpu(px.data(), 0, 2, d, o), "sky: zero w rejected");
check(!SkyboxSampleEquirectCpu(px.data(), 4, 2, d, nullptr),
"sky: null out rejected");
}
// Minimal flat Radiance .hdr (2x2, non-RLE: widths < 8 use flat RGBE).
// Pixel i: rgbe bytes -> float via stb.
auto build_tiny_hdr() -> std::vector<std::uint8_t> {
const std::string head = "#?RADIANCE\nFORMAT=32-bit_rle_rgbe\n\n-Y 2 +X 2\n";
std::vector<std::uint8_t> buf(head.begin(), head.end());
// (128,128,128,129) -> ~(1.0,1.0,1.0); (255,0,0,130) -> HDR red ~1.99.
const std::uint8_t px[4][4] = {
{128, 128, 128, 129}, {255, 0, 0, 130}, {0, 255, 0, 130}, {0, 0, 255, 130}};
for (const auto& p : px) {
for (int c = 0; c < 4; ++c) {
buf.push_back(p[c]);
}
}
return buf;
}
void test_cpu_hdr_decode() {
#if defined(ENGINE_ASSETS_HAS_STB)
const std::vector<std::uint8_t> hdr = build_tiny_hdr();
check(stbi_is_hdr_from_memory(hdr.data(), static_cast<int>(hdr.size())) != 0,
"sky: stb recognizes Radiance hdr");
int w = 0;
int h = 0;
int comp = 0;
float* f = stbi_loadf_from_memory(hdr.data(), static_cast<int>(hdr.size()),
&w, &h, &comp, 4);
check(f != nullptr, "sky: stbi_loadf decodes hdr");
if (f != nullptr) {
check(w == 2 && h == 2, "sky: hdr dims 2x2");
// Pixel 0 ~1.0 grey; pixel 1 HDR red > 1.5 (proves float range).
const bool grey = std::fabs(f[0] - 1.0F) < 0.02F &&
std::fabs(f[1] - 1.0F) < 0.02F &&
std::fabs(f[2] - 1.0F) < 0.02F;
check(grey, "sky: hdr grey pixel ~1.0");
check(f[4] > 1.5F && f[5] < 0.05F && f[6] < 0.05F,
"sky: hdr red pixel > 1 (float range)");
stbi_image_free(f);
}
// Non-HDR junk is rejected, not decoded as HDR.
const std::array<std::uint8_t, 8> junk = {0x89, 'P', 'N', 'G', 0, 0, 0, 0};
check(stbi_is_hdr_from_memory(junk.data(), 8) == 0, "sky: png not hdr");
#else
std::printf("[SKIP] sky: stb absent (offline configure)\n");
#endif
}
void test_cpu() {
test_cpu_validate();
test_cpu_face_dir();
test_cpu_sample();
test_cpu_hdr_decode();
}
#if defined(ENGINE_RENDERER_HAS_VULKAN)
// Extra compute entry points the shared GoldenVkProcs table lacks.
struct SkyComputeVk {
PFN_vkCreateComputePipelines create_comp{nullptr};
PFN_vkDestroyPipeline destroy_pipe{nullptr};
PFN_vkCmdBindPipeline cmd_bind_pipe{nullptr};
PFN_vkCmdBindDescriptorSets cmd_bind_sets{nullptr};
PFN_vkCmdPushConstants cmd_push{nullptr};
PFN_vkCmdDispatch cmd_dispatch{nullptr};
};
template <typename Loader>
void load_sky_compute_procs(Loader loader, SkyComputeVk* p) {
auto load = [&](const char* name) { return loader(name); };
p->create_comp = reinterpret_cast<PFN_vkCreateComputePipelines>(
load("vkCreateComputePipelines"));
p->destroy_pipe =
reinterpret_cast<PFN_vkDestroyPipeline>(load("vkDestroyPipeline"));
p->cmd_bind_pipe =
reinterpret_cast<PFN_vkCmdBindPipeline>(load("vkCmdBindPipeline"));
p->cmd_bind_sets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(
load("vkCmdBindDescriptorSets"));
p->cmd_push =
reinterpret_cast<PFN_vkCmdPushConstants>(load("vkCmdPushConstants"));
p->cmd_dispatch = reinterpret_cast<PFN_vkCmdDispatch>(load("vkCmdDispatch"));
}
auto sky_gpu_missing(std::string_view what) -> int {
failures += engine::test::GoldenGpuMissing(what);
return 1;
}
// Synthetic equirect: r = u*4 (HDR range), g = v*2, b = 0.5, a = 1.
void fill_synthetic_equirect(std::vector<float>* px, std::uint32_t w,
std::uint32_t h) {
px->resize(static_cast<std::size_t>(w) * h * 4);
for (std::uint32_t y = 0; y < h; ++y) {
for (std::uint32_t x = 0; x < w; ++x) {
const float u = (static_cast<float>(x) + 0.5F) / static_cast<float>(w);
const float v = (static_cast<float>(y) + 0.5F) / static_cast<float>(h);
const std::size_t i = (static_cast<std::size_t>(y) * w + x) * 4;
(*px)[i + 0] = u * 4.0F;
(*px)[i + 1] = v * 2.0F;
(*px)[i + 2] = 0.5F;
(*px)[i + 3] = 1.0F;
}
}
}
// Device-local cube-compatible RGBA32F image, 6 layers, STORAGE + SRC.
auto make_cube_image(engine::test::GoldenVk* g, std::uint32_t face,
engine::test::GoldenImage* out) -> bool {
return engine::test::GoldenMakeCube(
g, face, 1,
VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, out);
}
auto test_gpu() -> int {
using engine::renderer::VulkanDevice;
constexpr std::uint32_t kEqW = 64;
constexpr std::uint32_t kEqH = 32;
constexpr std::uint32_t kFace = 64;
VulkanDevice dev;
engine::test::GoldenVk g{};
const bool vk_ok = engine::test::GoldenOpenComputeDevice(
check, sky_gpu_missing, "P4-05-skybox", "skybox-gpu: no physical device",
"skybox-gpu: device init ok", "skybox-gpu: entry points resolve",
&dev, &g);
if (!vk_ok) {
return 1;
}
auto loader = [&](const char* name) -> void* {
void* p = dev.proc(name);
return (p != nullptr) ? p : dev.instance_proc(name);
};
SkyComputeVk sv{};
load_sky_compute_procs(loader, &sv);
const bool comp_ok =
g.vk.create_compute != nullptr && sv.destroy_pipe != nullptr &&
sv.cmd_bind_pipe != nullptr && g.vk.cmd_dispatch != nullptr &&
sv.cmd_bind_sets != nullptr && sv.cmd_push != nullptr;
check(comp_ok, "skybox-gpu: compute procs resolve");
if (!vk_ok || !comp_ok) {
return 1;
}
// Sonar S2259: the early return above proves all procedure pointers are
// non-null on every path past this point; assert so the analyzer sees it.
assert(vk_ok && comp_ok);
assert(g.vk.create_compute != nullptr && sv.destroy_pipe != nullptr &&
sv.cmd_bind_pipe != nullptr && sv.cmd_bind_sets != nullptr &&
sv.cmd_push != nullptr && g.vk.cmd_dispatch != nullptr);
// SPIR-V magic + version (checked-in blob sanity, like slang blobs).
check(kEquirect_to_cubeSpv[0] == 0x07230203u, "skybox-gpu: spv magic");
check(kEquirect_to_cubeSpv[1] >= 0x00010300u, "skybox-gpu: spv >= 1.3");
// Upload buffer with the synthetic equirect floats.
std::vector<float> eq;
fill_synthetic_equirect(&eq, kEqW, kEqH);
engine::test::GoldenHostBuf up_b{};
engine::test::GoldenHostBuf read_b{};
engine::test::GoldenImage eq_img{};
engine::test::GoldenImage cube_img{};
VkSampler sampler = nullptr;
VkDescriptorSetLayout set_layout = nullptr;
VkPipelineLayout pipe_layout = nullptr;
VkDescriptorPool pool = nullptr;
VkDescriptorSet set = nullptr;
VkPipeline pipe = nullptr;
VkShaderModule mod = nullptr;
const std::uint64_t eq_bytes = static_cast<std::uint64_t>(kEqW) * kEqH * 16;
const std::uint64_t face_bytes =
static_cast<std::uint64_t>(kFace) * kFace * 16;
const std::uint64_t cube_bytes = face_bytes * 6;
bool ok = engine::test::GoldenAllocHost(
&g, eq_bytes, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, &up_b) &&
engine::test::GoldenAllocHost(
&g, cube_bytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT, &read_b);
check(ok, "skybox-gpu: staging buffers");
if (ok) {
void* p = nullptr;
ok = g.vk.map_mem(g.device, up_b.mem, 0, eq_bytes, 0, &p) == VK_SUCCESS &&
p != nullptr;
if (ok) {
auto* d = static_cast<float*>(p);
for (std::size_t i = 0; i < eq.size(); ++i) {
d[i] = eq[i];
}
g.vk.unmap_mem(g.device, up_b.mem);
}
check(ok, "skybox-gpu: equirect uploaded to staging");
}
// Equirect sampled image (RGBA32F, SAMPLED + DST).
if (ok) {
ok = engine::test::GoldenMakeImage(
&g, VK_FORMAT_R32G32B32A32_SFLOAT, kEqW, kEqH,
VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT,
&eq_img);
check(ok, "skybox-gpu: equirect image");
}
if (ok) {
ok = make_cube_image(&g, kFace, &cube_img);
check(ok, "skybox-gpu: cubemap image (6 layers)");
}
if (ok) {
VkSamplerCreateInfo si{};
si.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
si.magFilter = VK_FILTER_LINEAR;
si.minFilter = VK_FILTER_LINEAR;
// Equirect wraps in U (longitude seam) but clamps in V (poles).
// REPEAT in U keeps the +/-X (and +/-Z) top/bottom edge texels in
// agreement with the CPU reference's u-wrap; CLAMP in V matches its
// v-clamp. Production skybox sampling uses the same modes.
si.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
si.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
si.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
ok = g.vk.create_sampler(g.device, &si, nullptr, &sampler) == VK_SUCCESS;
check(ok, "skybox-gpu: sampler");
}
// Set layout: 0 = combined sampler, 1 = storage image; push: face_size.
if (ok) {
ok = engine::test::GoldenMakeComputeSetLayout(&g, &set_layout);
check(ok, "skybox-gpu: set layout");
}
if (ok) {
VkPushConstantRange pc{};
pc.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
pc.size = 4;
VkPipelineLayoutCreateInfo pli{};
pli.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
pli.setLayoutCount = 1;
pli.pSetLayouts = &set_layout;
pli.pushConstantRangeCount = 1;
pli.pPushConstantRanges = &pc;
ok = g.vk.create_pipe_layout(g.device, &pli, nullptr, &pipe_layout) ==
VK_SUCCESS;
check(ok, "skybox-gpu: pipeline layout");
}
if (ok) {
ok = engine::test::GoldenMakeModule(&g, kEquirect_to_cubeSpv,
kEquirect_to_cubeSpvWords, &mod);
check(ok, "skybox-gpu: compute module");
}
if (ok) {
VkComputePipelineCreateInfo cpi{};
cpi.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
cpi.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
cpi.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
cpi.stage.module = mod;
cpi.stage.pName = "main";
cpi.layout = pipe_layout;
ok = g.vk.create_compute(g.device, nullptr, 1, &cpi, nullptr, &pipe) ==
VK_SUCCESS;
check(ok, "skybox-gpu: compute pipeline");
}
if (ok) {
VkDescriptorPoolSize sizes[2]{};
sizes[0].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
sizes[0].descriptorCount = 1;
sizes[1].type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
sizes[1].descriptorCount = 1;
VkDescriptorPoolCreateInfo pi{};
pi.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
pi.maxSets = 1;
pi.poolSizeCount = 2;
pi.pPoolSizes = sizes;
if (g.vk.create_pool(g.device, &pi, nullptr, &pool) != VK_SUCCESS) {
ok = false;
} else {
VkDescriptorSetAllocateInfo ai{};
ai.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
ai.descriptorPool = pool;
ai.descriptorSetCount = 1;
ai.pSetLayouts = &set_layout;
ok = g.vk.alloc_sets(g.device, &ai, &set) == VK_SUCCESS;
}
check(ok, "skybox-gpu: descriptor set");
}
if (ok) {
VkDescriptorImageInfo img_info{};
img_info.sampler = sampler;
img_info.imageView = eq_img.view;
img_info.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
VkDescriptorImageInfo stor_info{};
stor_info.imageView = cube_img.view;
stor_info.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
VkWriteDescriptorSet writes[2]{};
writes[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writes[0].dstSet = set;
writes[0].dstBinding = 0;
writes[0].descriptorCount = 1;
writes[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
writes[0].pImageInfo = &img_info;
writes[1].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writes[1].dstSet = set;
writes[1].dstBinding = 1;
writes[1].descriptorCount = 1;
writes[1].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
writes[1].pImageInfo = &stor_info;
g.vk.update_sets(g.device, 2, writes, 0, nullptr);
check(true, "skybox-gpu: descriptors written");
}
// Record: upload equirect, dispatch (face/16, face/16, 6), read back.
if (ok) {
VkCommandPool cmd_pool = nullptr;
VkCommandBuffer cb = nullptr;
VkCommandPoolCreateInfo cpi{};
cpi.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
cpi.queueFamilyIndex = g.queue_family;
ok = g.vk.create_cmd_pool(g.device, &cpi, nullptr, &cmd_pool) ==
VK_SUCCESS;
if (ok) {
ok = engine::test::GoldenBeginCmd(&g, cmd_pool, &cb);
}
auto barrier_img = [&](VkImage img, VkImageLayout old_l, VkImageLayout new_l,
VkPipelineStageFlags2 src_s, VkAccessFlags2 src_a,
VkPipelineStageFlags2 dst_s, VkAccessFlags2 dst_a,
std::uint32_t layers) {
VkImageMemoryBarrier2 b{};
b.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2;
b.srcStageMask = src_s;
b.srcAccessMask = src_a;
b.dstStageMask = dst_s;
b.dstAccessMask = dst_a;
b.oldLayout = old_l;
b.newLayout = new_l;
b.image = img;
b.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, layers};
VkDependencyInfo d{};
d.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO;
d.imageMemoryBarrierCount = 1;
d.pImageMemoryBarriers = &b;
g.vk.cmd_barrier2(cb, &d);
};
if (ok) {
barrier_img(eq_img.img, VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, 0,
VK_PIPELINE_STAGE_2_COPY_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT,
1);
VkBufferImageCopy rc{};
rc.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
rc.imageExtent = {kEqW, kEqH, 1};
g.vk.cmd_copy_buf_img(cb, up_b.buf, eq_img.img,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &rc);
barrier_img(eq_img.img, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_2_COPY_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT,
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, 1);
barrier_img(cube_img.img, VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_GENERAL, 0, 0,
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, 6);
sv.cmd_bind_pipe(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipe);
sv.cmd_bind_sets(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipe_layout, 0, 1,
&set, 0, nullptr);
sv.cmd_push(cb, pipe_layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, 4, &kFace);
g.vk.cmd_dispatch(cb, kFace / 16, kFace / 16, 6);
barrier_img(cube_img.img, VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT,
VK_PIPELINE_STAGE_2_COPY_BIT, VK_ACCESS_2_TRANSFER_READ_BIT,
6);
for (std::uint32_t layer = 0; layer < 6; ++layer) {
VkBufferImageCopy rl{};
rl.bufferOffset = static_cast<VkDeviceSize>(layer) * face_bytes;
rl.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, layer, 1};
rl.imageExtent = {kFace, kFace, 1};
g.vk.cmd_copy_img_buf(cb, cube_img.img,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, read_b.buf,
1, &rl);
}
ok = engine::test::GoldenEndReadback(&g, cb);
}
check(ok, "skybox-gpu: frame recorded");
if (ok) {
ok = engine::test::GoldenSubmitWait(&g, cb);
check(ok, "skybox-gpu: submit + fence wait");
}
if (cmd_pool != nullptr) {
g.vk.destroy_cmd_pool(g.device, cmd_pool, nullptr);
}
}
// Readback: every texel vs CPU reference (hardware-filter tolerance).
// Tolerance budget (CodeRabbit review thread on this check): observed
// worst on the tested lanes (lavapipe + macOS/MoltenVK) is ~1e-4, so the
// 0.02 bound below carries ~200x margin for Vulkan-legal filter and
// shader-math spread (incl. the wrap-seam texel quoted in that thread).
// No per-texel carve-out: the single global bound covers all texels with
// margin on every lane. device_hint stays a preference (llvmpipe
// fallback), and the same binary runs ENGINE_REQUIRE_GPU=1 on every CI
// lane incl. macOS/MoltenVK.
if (ok) {
void* p = nullptr;
ok = g.vk.map_mem(g.device, read_b.mem, 0, cube_bytes, 0, &p) ==
VK_SUCCESS &&
p != nullptr;
check(ok, "skybox-gpu: readback mapped");
if (ok) {
const auto* f = static_cast<const float*>(p);
std::uint32_t bad = 0;
std::uint32_t nan_ct = 0;
float worst = 0.0F;
float worst_u = 0.0F;
float worst_v = 0.0F;
std::uint32_t worst_face = 0;
std::uint32_t worst_x = 0;
std::uint32_t worst_y = 0;
int worst_c = 0;
for (std::uint32_t face = 0; face < 6; ++face) {
for (std::uint32_t y = 0; y < kFace; ++y) {
for (std::uint32_t x = 0; x < kFace; ++x) {
float dir[3] = {0.0F, 0.0F, 0.0F};
float want[3] = {0.0F, 0.0F, 0.0F};
if (!engine::renderer::SkyboxFaceDir(face, x, y, kFace, dir) ||
!engine::renderer::SkyboxSampleEquirectCpu(
eq.data(), kEqW, kEqH, dir, want)) {
++bad;
continue;
}
const std::size_t i =
(static_cast<std::size_t>(face) * kFace * kFace +
static_cast<std::size_t>(y) * kFace + x) *
4;
for (int c = 0; c < 3; ++c) {
const float got = f[i + static_cast<std::size_t>(c)];
if (!std::isfinite(got)) {
++nan_ct;
continue;
}
const float dd = std::fabs(got - want[c]);
if (dd > worst) {
worst = dd;
worst_face = face;
worst_x = x;
worst_y = y;
worst_c = c;
engine::renderer::SkyboxDirToUv(dir[0], dir[1], dir[2],
&worst_u, &worst_v);
}
if (dd > 0.02F) {
++bad;
if (bad <= 5) {
float uu = 0.0F;
float vv = 0.0F;
engine::renderer::SkyboxDirToUv(dir[0], dir[1], dir[2], &uu,
&vv);
std::printf(
"[INFO] skybox-gpu: mismatch face=%u x=%u y=%u c=%d "
"got=%.4f want=%.4f uv=%.4f,%.4f dir=%.4f,%.4f,%.4f\n",
face, x, y, c, static_cast<double>(got),
static_cast<double>(want[c]),
static_cast<double>(uu), static_cast<double>(vv),
static_cast<double>(dir[0]), static_cast<double>(dir[1]),
static_cast<double>(dir[2]));
}
}
}
if (std::fabs(f[i + 3] - 1.0F) > 1e-5F) {
++bad;
}
}
}
}
std::printf("[INFO] skybox-gpu: worst abs diff %.6f, bad=%u nan=%u\n",
static_cast<double>(worst), bad, nan_ct);
std::printf(
"[INFO] skybox-gpu: worst at face=%u x=%u y=%u c=%d uv=%.5f,%.5f\n",
worst_face, worst_x, worst_y, worst_c,
static_cast<double>(worst_u), static_cast<double>(worst_v));
check(bad == 0 && nan_ct == 0, "skybox-gpu: cubemap matches CPU ref");
// HDR range survived: +X center samples u~0.75 -> r ~3.0.
const std::size_t center_i =
(static_cast<std::size_t>(0) * kFace * kFace +
static_cast<std::size_t>(kFace / 2) * kFace +
static_cast<std::size_t>(kFace / 2)) *
4;
check(f[center_i] > 2.0F, "skybox-gpu: HDR range > 1 survives");
g.vk.unmap_mem(g.device, read_b.mem);
}
}
if (pipe != nullptr) {
sv.destroy_pipe(g.device, pipe, nullptr);
}
if (mod != nullptr) {
g.vk.destroy_module(g.device, mod, nullptr);
}
if (set_layout != nullptr) {
g.vk.destroy_set_layout(g.device, set_layout, nullptr);
}
if (pipe_layout != nullptr) {
g.vk.destroy_pipe_layout(g.device, pipe_layout, nullptr);
}
if (pool != nullptr) {
g.vk.destroy_pool(g.device, pool, nullptr);
}
if (sampler != nullptr) {
g.vk.destroy_sampler(g.device, sampler, nullptr);
}
engine::test::GoldenFreeImage(&g, &eq_img);
engine::test::GoldenFreeImage(&g, &cube_img);
engine::test::GoldenFreeHost(&g, &up_b);
engine::test::GoldenFreeHost(&g, &read_b);
dev.shutdown();
return 0;
}
#endif
} // namespace
auto main() -> int {
test_cpu();
#if defined(ENGINE_RENDERER_HAS_VULKAN)
test_gpu();
#else
std::printf("[SKIP] skybox-gpu: SDK absent (stub build)\n");
#endif
std::printf(failures == 0 ? "test_skybox_import: all checks passed\n"
: "test_skybox_import: %d FAILED\n",
failures);
return failures == 0 ? 0 : 1;
}