summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3d/renderer.cc189
-rw-r--r--src/3d/renderer.h21
-rw-r--r--src/generated/assets.h7
-rw-r--r--src/generated/assets_data.cc628
-rw-r--r--src/generated/test_assets.h7
-rw-r--r--src/generated/test_assets_data.cc94
-rw-r--r--src/gpu/effects/shader_composer.cc33
-rw-r--r--src/gpu/effects/shader_composer.h9
-rw-r--r--src/gpu/effects/shaders.cc6
-rw-r--r--src/tests/test_3d_physics.cc3
-rw-r--r--src/tests/test_3d_render.cc3
11 files changed, 649 insertions, 351 deletions
diff --git a/src/3d/renderer.cc b/src/3d/renderer.cc
index 684fda9..9dfc1f8 100644
--- a/src/3d/renderer.cc
+++ b/src/3d/renderer.cc
@@ -133,6 +133,8 @@ void Renderer3D::shutdown() {
wgpuSamplerRelease(default_sampler_);
if (pipeline_)
wgpuRenderPipelineRelease(pipeline_);
+ if (pipeline_no_bvh_)
+ wgpuRenderPipelineRelease(pipeline_no_bvh_);
if (bind_group_)
wgpuBindGroupRelease(bind_group_);
if (skybox_pipeline_)
@@ -143,6 +145,8 @@ void Renderer3D::shutdown() {
wgpuBufferRelease(global_uniform_buffer_);
if (object_storage_buffer_)
wgpuBufferRelease(object_storage_buffer_);
+ if (bvh_storage_buffer_)
+ wgpuBufferRelease(bvh_storage_buffer_);
if (depth_view_)
wgpuTextureViewRelease(depth_view_);
if (depth_texture_)
@@ -189,6 +193,10 @@ void Renderer3D::create_default_resources() {
WGPUBufferUsage_Storage | WGPUBufferUsage_CopyDst,
nullptr)
.buffer;
+ bvh_storage_buffer_ = gpu_create_buffer(
+ device_, sizeof(BVHNode) * kMaxObjects * 2, // Capacity for a full tree
+ WGPUBufferUsage_Storage | WGPUBufferUsage_CopyDst, nullptr)
+ .buffer;
}
void Renderer3D::set_noise_texture(WGPUTextureView noise_view) {
@@ -207,34 +215,75 @@ void Renderer3D::add_debug_aabb(const vec3& min, const vec3& max,
}
void Renderer3D::create_pipeline() {
- WGPUBindGroupLayoutEntry entries[5] = {};
- entries[0].binding = 0;
- entries[0].visibility = WGPUShaderStage_Vertex | WGPUShaderStage_Fragment;
- entries[0].buffer.type = WGPUBufferBindingType_Uniform;
- entries[0].buffer.minBindingSize = sizeof(GlobalUniforms);
+ pipeline_ = create_pipeline_impl(true); // BVH enabled
+ pipeline_no_bvh_ = create_pipeline_impl(false); // BVH disabled
+}
- entries[1].binding = 1;
- entries[1].visibility = WGPUShaderStage_Vertex | WGPUShaderStage_Fragment;
- entries[1].buffer.type = WGPUBufferBindingType_ReadOnlyStorage;
- entries[1].buffer.minBindingSize = sizeof(ObjectData) * kMaxObjects;
+WGPURenderPipeline Renderer3D::create_pipeline_impl(bool use_bvh) {
+ std::vector<WGPUBindGroupLayoutEntry> entries;
- entries[2].binding = 2;
- entries[2].visibility = WGPUShaderStage_Fragment;
- entries[2].texture.sampleType = WGPUTextureSampleType_Float;
- entries[2].texture.viewDimension = WGPUTextureViewDimension_2D;
+ // Binding 0: Global Uniforms
+ {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 0;
+ e.visibility = WGPUShaderStage_Vertex | WGPUShaderStage_Fragment;
+ e.buffer.type = WGPUBufferBindingType_Uniform;
+ e.buffer.minBindingSize = sizeof(GlobalUniforms);
+ entries.push_back(e);
+ }
+
+ // Binding 1: Object Data
+ {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 1;
+ e.visibility = WGPUShaderStage_Vertex | WGPUShaderStage_Fragment;
+ e.buffer.type = WGPUBufferBindingType_ReadOnlyStorage;
+ e.buffer.minBindingSize = sizeof(ObjectData) * kMaxObjects;
+ entries.push_back(e);
+ }
+
+ // Binding 2: BVH Nodes (only if BVH is used)
+ if (use_bvh) {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 2;
+ e.visibility = WGPUShaderStage_Fragment;
+ e.buffer.type = WGPUBufferBindingType_ReadOnlyStorage;
+ e.buffer.minBindingSize = sizeof(BVHNode) * kMaxObjects * 2;
+ entries.push_back(e);
+ }
- entries[3].binding = 3;
- entries[3].visibility = WGPUShaderStage_Fragment;
- entries[3].sampler.type = WGPUSamplerBindingType_Filtering;
+ // Binding 3: Noise Texture
+ {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 3;
+ e.visibility = WGPUShaderStage_Fragment;
+ e.texture.sampleType = WGPUTextureSampleType_Float;
+ e.texture.viewDimension = WGPUTextureViewDimension_2D;
+ entries.push_back(e);
+ }
- entries[4].binding = 4;
- entries[4].visibility = WGPUShaderStage_Fragment;
- entries[4].texture.sampleType = WGPUTextureSampleType_Float;
- entries[4].texture.viewDimension = WGPUTextureViewDimension_2D;
+ // Binding 4: Default Sampler
+ {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 4;
+ e.visibility = WGPUShaderStage_Fragment;
+ e.sampler.type = WGPUSamplerBindingType_Filtering;
+ entries.push_back(e);
+ }
+
+ // Binding 5: Sky Texture
+ {
+ WGPUBindGroupLayoutEntry e = {};
+ e.binding = 5;
+ e.visibility = WGPUShaderStage_Fragment;
+ e.texture.sampleType = WGPUTextureSampleType_Float;
+ e.texture.viewDimension = WGPUTextureViewDimension_2D;
+ entries.push_back(e);
+ }
WGPUBindGroupLayoutDescriptor bgl_desc = {};
- bgl_desc.entryCount = 5;
- bgl_desc.entries = entries;
+ bgl_desc.entryCount = (uint32_t)entries.size();
+ bgl_desc.entries = entries.data();
WGPUBindGroupLayout bgl = wgpuDeviceCreateBindGroupLayout(device_, &bgl_desc);
WGPUPipelineLayoutDescriptor pl_desc = {};
@@ -246,7 +295,18 @@ void Renderer3D::create_pipeline() {
const char* asset_data =
(const char*)GetAsset(AssetId::ASSET_SHADER_RENDERER_3D);
std::string main_code = asset_data;
- std::string shader_source = ShaderComposer::Get().Compose({}, main_code);
+
+ // Use ShaderComposer to dynamically include the correct scene_query snippet
+ ShaderComposer::CompositionMap composition_map;
+ if (use_bvh) {
+ composition_map["render/scene_query_mode"] = "render/scene_query_bvh";
+ } else {
+ composition_map["render/scene_query_mode"] = "render/scene_query_linear";
+ }
+ std::string shader_source = ShaderComposer::Get().Compose({}, main_code, composition_map);
+
+ // DEBUG: Print shader source to check for include errors
+ std::cout << "Shader Source (BVH=" << use_bvh << "):" << std::endl << shader_source << std::endl;
#if defined(DEMO_CROSS_COMPILE_WIN32)
WGPUShaderModuleWGSLDescriptor wgsl_desc = {};
@@ -297,10 +357,12 @@ void Renderer3D::create_pipeline() {
desc.multisample.count = 1;
desc.multisample.mask = 0xFFFFFFFF;
- pipeline_ = wgpuDeviceCreateRenderPipeline(device_, &desc);
+ WGPURenderPipeline pipeline = wgpuDeviceCreateRenderPipeline(device_, &desc);
wgpuBindGroupLayoutRelease(bgl);
wgpuPipelineLayoutRelease(pipeline_layout);
wgpuShaderModuleRelease(shader_module);
+
+ return pipeline;
}
void Renderer3D::update_uniforms(const Scene& scene, const Camera& camera,
@@ -346,6 +408,13 @@ void Renderer3D::update_uniforms(const Scene& scene, const Camera& camera,
wgpuQueueWriteBuffer(queue_, object_storage_buffer_, 0, obj_data.data(),
obj_data.size() * sizeof(ObjectData));
}
+
+ // Build and upload BVH (always uploaded, used by BVH pipeline)
+ BVHBuilder::build(cpu_bvh_, scene.objects);
+ if (!cpu_bvh_.nodes.empty()) {
+ wgpuQueueWriteBuffer(queue_, bvh_storage_buffer_, 0, cpu_bvh_.nodes.data(),
+ cpu_bvh_.nodes.size() * sizeof(BVHNode));
+ }
}
void Renderer3D::draw(WGPURenderPassEncoder pass, const Scene& scene,
@@ -357,36 +426,70 @@ void Renderer3D::draw(WGPURenderPassEncoder pass, const Scene& scene,
if (bind_group_)
wgpuBindGroupRelease(bind_group_);
- WGPUBindGroupEntry bg_entries[5] = {};
+ std::vector<WGPUBindGroupEntry> bg_entries;
+
+ {
+ WGPUBindGroupEntry e = {};
+ e.binding = 0;
+ e.buffer = global_uniform_buffer_;
+ e.size = sizeof(GlobalUniforms);
+ bg_entries.push_back(e);
+ }
- bg_entries[0].binding = 0;
- bg_entries[0].buffer = global_uniform_buffer_;
- bg_entries[0].size = sizeof(GlobalUniforms);
+ {
+ WGPUBindGroupEntry e = {};
+ e.binding = 1;
+ e.buffer = object_storage_buffer_;
+ e.size = sizeof(ObjectData) * kMaxObjects;
+ bg_entries.push_back(e);
+ }
- bg_entries[1].binding = 1;
- bg_entries[1].buffer = object_storage_buffer_;
- bg_entries[1].size = sizeof(ObjectData) * kMaxObjects;
+ if (bvh_enabled_) {
+ WGPUBindGroupEntry e = {};
+ e.binding = 2;
+ e.buffer = bvh_storage_buffer_;
+ e.size = sizeof(BVHNode) * kMaxObjects * 2;
+ bg_entries.push_back(e);
+ }
- bg_entries[2].binding = 2;
- bg_entries[2].textureView = noise_texture_view_;
+ {
+ WGPUBindGroupEntry e = {};
+ e.binding = 3;
+ e.textureView = noise_texture_view_;
+ bg_entries.push_back(e);
+ }
- bg_entries[3].binding = 3;
- bg_entries[3].sampler = default_sampler_;
+ {
+ WGPUBindGroupEntry e = {};
+ e.binding = 4;
+ e.sampler = default_sampler_;
+ bg_entries.push_back(e);
+ }
+
+ {
+ WGPUBindGroupEntry e = {};
+ e.binding = 5;
+ e.textureView =
+ sky_texture_view_ ? sky_texture_view_ : noise_texture_view_;
+ bg_entries.push_back(e);
+ }
- bg_entries[4].binding = 4;
- bg_entries[4].textureView =
- sky_texture_view_ ? sky_texture_view_ : noise_texture_view_; // Fallback
+ // Select the correct pipeline and bind group layout
+ WGPURenderPipeline current_pipeline =
+ bvh_enabled_ ? pipeline_ : pipeline_no_bvh_;
+ WGPUBindGroupLayout current_layout =
+ wgpuRenderPipelineGetBindGroupLayout(current_pipeline, 0);
WGPUBindGroupDescriptor bg_desc = {};
- bg_desc.layout = wgpuRenderPipelineGetBindGroupLayout(pipeline_, 0);
- bg_desc.entryCount = 5;
- bg_desc.entries = bg_entries;
+ bg_desc.layout = current_layout;
+ bg_desc.entryCount = (uint32_t)bg_entries.size();
+ bg_desc.entries = bg_entries.data();
bind_group_ = wgpuDeviceCreateBindGroup(device_, &bg_desc);
- wgpuBindGroupLayoutRelease(bg_desc.layout);
+ wgpuBindGroupLayoutRelease(current_layout);
- wgpuRenderPassEncoderSetPipeline(pass, pipeline_);
+ wgpuRenderPassEncoderSetPipeline(pass, current_pipeline);
wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr);
diff --git a/src/3d/renderer.h b/src/3d/renderer.h
index 8068bdc..db86b72 100644
--- a/src/3d/renderer.h
+++ b/src/3d/renderer.h
@@ -6,6 +6,7 @@
#include "3d/camera.h"
#include "3d/scene.h"
+#include "3d/bvh.h"
#include "gpu/gpu.h"
#include <vector>
@@ -43,19 +44,12 @@ class Renderer3D {
#endif
// Renders the scene to the given texture view (Convenience: creates a pass)
-
void render(const Scene& scene, const Camera& camera, float time,
-
WGPUTextureView target_view,
WGPUTextureView depth_view_opt = nullptr);
// Records draw commands to an existing pass.
-
// Assumes the pass has a compatible pipeline (or we set it here).
-
- // Note: Caller must ensure depth/color attachments are set up correctly in
- // the pass.
-
void draw(WGPURenderPassEncoder pass, const Scene& scene,
const Camera& camera, float time);
@@ -67,8 +61,12 @@ class Renderer3D {
// Resize handler (if needed for internal buffers)
void resize(int width, int height);
+ // Set whether to use BVH acceleration
+ void SetBvhEnabled(bool enabled) { bvh_enabled_ = enabled; }
+
private:
void create_pipeline();
+ WGPURenderPipeline create_pipeline_impl(bool use_bvh);
void create_skybox_pipeline();
void create_default_resources();
void update_uniforms(const Scene& scene, const Camera& camera, float time);
@@ -77,12 +75,17 @@ class Renderer3D {
WGPUQueue queue_ = nullptr;
WGPUTextureFormat format_ = WGPUTextureFormat_Undefined;
- WGPURenderPipeline pipeline_ = nullptr;
+ WGPURenderPipeline pipeline_ = nullptr; // BVH enabled
+ WGPURenderPipeline pipeline_no_bvh_ = nullptr; // BVH disabled
WGPUBindGroup bind_group_ = nullptr;
WGPURenderPipeline skybox_pipeline_ = nullptr;
WGPUBindGroup skybox_bind_group_ = nullptr;
WGPUBuffer global_uniform_buffer_ = nullptr;
WGPUBuffer object_storage_buffer_ = nullptr;
+ WGPUBuffer bvh_storage_buffer_ = nullptr;
+
+ BVH cpu_bvh_; // Keep a CPU-side copy for building/uploading
+ bool bvh_enabled_ = true;
WGPUTextureView noise_texture_view_ = nullptr;
WGPUTextureView sky_texture_view_ = nullptr;
@@ -101,4 +104,4 @@ class Renderer3D {
VisualDebug visual_debug_;
static bool s_debug_enabled_;
#endif
-};
+}; \ No newline at end of file
diff --git a/src/generated/assets.h b/src/generated/assets.h
index cda571b..7a4f449 100644
--- a/src/generated/assets.h
+++ b/src/generated/assets.h
@@ -41,9 +41,10 @@ enum class AssetId : uint16_t {
ASSET_SHADER_MATH_SDF_SHAPES = 34,
ASSET_SHADER_MATH_SDF_UTILS = 35,
ASSET_SHADER_RENDER_SHADOWS = 36,
- ASSET_SHADER_RENDER_SCENE_QUERY = 37,
- ASSET_SHADER_RENDER_LIGHTING_UTILS = 38,
- ASSET_LAST_ID = 39,
+ ASSET_SHADER_RENDER_SCENE_QUERY_BVH = 37,
+ ASSET_SHADER_RENDER_SCENE_QUERY_LINEAR = 38,
+ ASSET_SHADER_RENDER_LIGHTING_UTILS = 39,
+ ASSET_LAST_ID = 40,
};
#include "util/asset_manager.h"
diff --git a/src/generated/assets_data.cc b/src/generated/assets_data.cc
index 8bcd6d5..b6a3c7b 100644
--- a/src/generated/assets_data.cc
+++ b/src/generated/assets_data.cc
@@ -369584,7 +369584,7 @@ static const float ASSET_PROC_PARAMS_NOISE_TEX[] = {1234.000000, 16.000000};
static const char* ASSET_PROC_FUNC_STR_NOISE_TEX = "gen_noise";
-const size_t ASSET_SIZE_SHADER_RENDERER_3D = 7477;
+const size_t ASSET_SIZE_SHADER_RENDERER_3D = 7536;
alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDERER_3D[] = {
0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d,
@@ -369599,187 +369599,192 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDERER_3D[] = {
0x65, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x3e, 0x20, 0x6f, 0x62, 0x6a,
0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x20, 0x4f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x3b,
- 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x29, 0x20, 0x40,
- 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x32, 0x29, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x78,
- 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64,
- 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75,
- 0x70, 0x28, 0x30, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e,
- 0x67, 0x28, 0x33, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x69,
- 0x73, 0x65, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x3a, 0x20,
- 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x3b, 0x0a, 0x40, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x28, 0x30, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64,
- 0x69, 0x6e, 0x67, 0x28, 0x34, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73,
- 0x6b, 0x79, 0x5f, 0x74, 0x65, 0x78, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
- 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b,
- 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x56, 0x65, 0x72,
- 0x74, 0x65, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x40, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e,
- 0x28, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x70,
- 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x76, 0x65, 0x63,
- 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x29,
- 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x3a, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x28, 0x31, 0x29, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x76,
- 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28,
- 0x32, 0x29, 0x20, 0x40, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c,
- 0x61, 0x74, 0x65, 0x28, 0x66, 0x6c, 0x61, 0x74, 0x29, 0x20, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
- 0x3a, 0x20, 0x75, 0x33, 0x32, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40,
- 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x33, 0x29, 0x20,
- 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x3a, 0x20, 0x76,
- 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x3b,
- 0x0a, 0x0a, 0x40, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x0a, 0x66, 0x6e,
- 0x20, 0x76, 0x73, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x40, 0x62, 0x75,
- 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78,
- 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x20, 0x76, 0x65, 0x72, 0x74,
- 0x65, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x20, 0x75, 0x33,
- 0x32, 0x2c, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x40, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x29, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x20, 0x75, 0x33, 0x32, 0x29,
- 0x20, 0x2d, 0x3e, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x4f, 0x75,
- 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70, 0x6f, 0x73, 0x20,
- 0x3d, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x76, 0x65, 0x63, 0x33,
- 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x33, 0x36, 0x3e, 0x28, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33,
- 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c,
- 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e,
- 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e,
- 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20,
- 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20,
- 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
- 0x61, 0x72, 0x20, 0x70, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x73, 0x5b, 0x76,
- 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6f, 0x62,
- 0x6a, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64,
- 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5b,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64,
- 0x65, 0x78, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74,
- 0x20, 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20,
- 0x6f, 0x62, 0x6a, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78,
- 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x69,
- 0x67, 0x68, 0x74, 0x20, 0x66, 0x69, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20,
- 0x54, 0x6f, 0x72, 0x75, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20,
- 0x68, 0x75, 0x6c, 0x6c, 0x20, 0x28, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20,
- 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
- 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x20, 0x30, 0x2e, 0x34, 0x29, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x2e, 0x30, 0x29, 0x20,
- 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x2e,
- 0x78, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x31, 0x2e,
- 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
- 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x31,
- 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x70, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x79, 0x20, 0x2a, 0x20,
- 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6c,
- 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x2e,
- 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34,
- 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x70, 0x2c, 0x20, 0x31, 0x2e, 0x30,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x63,
- 0x6c, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x6c,
- 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x70,
- 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f,
- 0x70, 0x6f, 0x73, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61,
- 0x72, 0x20, 0x6f, 0x75, 0x74, 0x3a, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65,
- 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
- 0x6e, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x6c, 0x6f,
- 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x3b,
- 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x63, 0x6f,
- 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x63, 0x6f,
- 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74,
- 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e,
- 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f,
- 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f,
- 0x70, 0x6f, 0x73, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b,
- 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
- 0x20, 0x22, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2f, 0x73, 0x63, 0x65,
- 0x6e, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x0a, 0x23, 0x69,
+ 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67,
+ 0x20, 0x32, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x42, 0x56, 0x48, 0x20, 0x62,
+ 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x65,
+ 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x28, 0x30, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69,
+ 0x6e, 0x67, 0x28, 0x33, 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f,
+ 0x69, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x3a, 0x20, 0x74, 0x65, 0x78,
+ 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x3c, 0x66, 0x33, 0x32, 0x3e,
+ 0x3b, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30, 0x29, 0x20,
+ 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x34, 0x29, 0x20,
+ 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x73, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x3a, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x72, 0x3b, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28, 0x30,
+ 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28, 0x35,
+ 0x29, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x6b, 0x79, 0x5f, 0x74, 0x65,
+ 0x78, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32,
+ 0x64, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x4f, 0x75,
+ 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40,
+ 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32,
+ 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x30, 0x29, 0x20, 0x6c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c,
+ 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40, 0x6c,
+ 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x31, 0x29, 0x20, 0x63,
+ 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66,
+ 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40, 0x6c, 0x6f,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x32, 0x29, 0x20, 0x40, 0x69,
+ 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x28, 0x66,
+ 0x6c, 0x61, 0x74, 0x29, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x20, 0x75, 0x33, 0x32,
+ 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x40, 0x6c, 0x6f, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x28, 0x33, 0x29, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64,
+ 0x5f, 0x70, 0x6f, 0x73, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66,
+ 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x40, 0x76, 0x65,
+ 0x72, 0x74, 0x65, 0x78, 0x0a, 0x66, 0x6e, 0x20, 0x76, 0x73, 0x5f, 0x6d,
+ 0x61, 0x69, 0x6e, 0x28, 0x40, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e,
+ 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x29, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6e,
+ 0x64, 0x65, 0x78, 0x3a, 0x20, 0x75, 0x33, 0x32, 0x2c, 0x20, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x62,
+ 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x28, 0x69, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x20, 0x69,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x3a, 0x20, 0x75, 0x33, 0x32, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x56,
+ 0x65, 0x72, 0x74, 0x65, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20,
+ 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76,
+ 0x61, 0x72, 0x20, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x72,
+ 0x61, 0x79, 0x3c, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e,
+ 0x2c, 0x20, 0x33, 0x36, 0x3e, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x20, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30,
+ 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31,
+ 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28,
+ 0x2d, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20,
+ 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x29, 0x3b,
+ 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x70, 0x20,
+ 0x3d, 0x20, 0x70, 0x6f, 0x73, 0x5b, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78,
+ 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x20, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5b, 0x69, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x3b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x3b, 0x0a, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x69, 0x67, 0x68, 0x74, 0x20, 0x66,
+ 0x69, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x54, 0x6f, 0x72, 0x75, 0x73,
+ 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x68, 0x75, 0x6c, 0x6c, 0x20,
+ 0x28, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x72, 0x61, 0x64, 0x69, 0x75,
+ 0x73, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x6f, 0x72,
+ 0x20, 0x30, 0x2e, 0x34, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
+ 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d,
+ 0x3d, 0x20, 0x33, 0x2e, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x70,
+ 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x31, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x2e, 0x7a, 0x20, 0x3d, 0x20,
+ 0x70, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x31, 0x2e, 0x35, 0x3b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x2e, 0x79, 0x20, 0x3d,
+ 0x20, 0x70, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
+ 0x65, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x73,
+ 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e,
+ 0x28, 0x70, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x5f, 0x70,
+ 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73,
+ 0x2e, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x20, 0x2a,
+ 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x3b, 0x0a,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x6f, 0x75, 0x74,
+ 0x3a, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x4f, 0x75, 0x74, 0x70,
+ 0x75, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x63,
+ 0x6c, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70,
+ 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x3b, 0x20, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d,
+ 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d,
+ 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e,
+ 0x64, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74,
+ 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x20, 0x3d,
+ 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x2e, 0x78,
+ 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
+ 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23,
+ 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x72, 0x65, 0x6e,
+ 0x64, 0x65, 0x72, 0x2f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x5f, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x0a, 0x23, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x72, 0x65, 0x6e, 0x64,
0x65, 0x72, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x22, 0x0a,
0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x72, 0x65,
@@ -370209,7 +370214,7 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDERER_3D[] = {
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34,
0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x6c, 0x69, 0x74, 0x5f, 0x63, 0x6f,
0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x7d,
- 0x0a, 0x00
+ 0x00
};
const size_t ASSET_SIZE_SHADER_COMMON_UNIFORMS = 346;
alignas(16) static const uint8_t ASSET_DATA_SHADER_COMMON_UNIFORMS[] = {
@@ -371636,7 +371641,7 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_MATH_SDF_SHAPES[] = {
0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x6f, 0x74, 0x28, 0x70, 0x2c, 0x20,
0x6e, 0x29, 0x20, 0x2b, 0x20, 0x68, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
};
-const size_t ASSET_SIZE_SHADER_MATH_SDF_UTILS = 403;
+const size_t ASSET_SIZE_SHADER_MATH_SDF_UTILS = 718;
alignas(16) static const uint8_t ASSET_DATA_SHADER_MATH_SDF_UTILS[] = {
0x66, 0x6e, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61,
0x6c, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x28, 0x70, 0x3a, 0x20, 0x76,
@@ -371671,7 +371676,33 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_MATH_SDF_UTILS[] = {
0x20, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x28,
0x70, 0x20, 0x2d, 0x20, 0x65, 0x2e, 0x79, 0x79, 0x78, 0x2c, 0x20, 0x6f,
0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x29, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
+ 0x20, 0x29, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44,
+ 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61,
+ 0x6e, 0x20, 0x41, 0x78, 0x69, 0x73, 0x2d, 0x41, 0x6c, 0x69, 0x67, 0x6e,
+ 0x65, 0x64, 0x20, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20,
+ 0x42, 0x6f, 0x78, 0x0a, 0x66, 0x6e, 0x20, 0x61, 0x61, 0x62, 0x62, 0x5f,
+ 0x73, 0x64, 0x66, 0x28, 0x70, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c,
+ 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x3a,
+ 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20,
+ 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c,
+ 0x66, 0x33, 0x32, 0x3e, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33, 0x32,
+ 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x63,
+ 0x65, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x69, 0x6e,
+ 0x5f, 0x70, 0x20, 0x2b, 0x20, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x29, 0x20,
+ 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
+ 0x65, 0x74, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20,
+ 0x28, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x20, 0x2d, 0x20, 0x6d, 0x69, 0x6e,
+ 0x5f, 0x70, 0x29, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x71, 0x20, 0x3d, 0x20, 0x61,
+ 0x62, 0x73, 0x28, 0x70, 0x20, 0x2d, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65,
+ 0x72, 0x29, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x3b,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
+ 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x6d, 0x61, 0x78, 0x28, 0x71,
+ 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28,
+ 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x6d, 0x69, 0x6e,
+ 0x28, 0x6d, 0x61, 0x78, 0x28, 0x71, 0x2e, 0x78, 0x2c, 0x20, 0x6d, 0x61,
+ 0x78, 0x28, 0x71, 0x2e, 0x79, 0x2c, 0x20, 0x71, 0x2e, 0x7a, 0x29, 0x29,
+ 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
};
const size_t ASSET_SIZE_SHADER_RENDER_SHADOWS = 441;
alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SHADOWS[] = {
@@ -371713,8 +371744,160 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SHADOWS[] = {
0x6d, 0x70, 0x28, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c,
0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
};
-const size_t ASSET_SIZE_SHADER_RENDER_SCENE_QUERY = 1220;
-alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SCENE_QUERY[] = {
+const size_t ASSET_SIZE_SHADER_RENDER_SCENE_QUERY_BVH = 1782;
+alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SCENE_QUERY_BVH[] = {
+ 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x6d, 0x61,
+ 0x74, 0x68, 0x2f, 0x73, 0x64, 0x66, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65,
+ 0x73, 0x22, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20,
+ 0x22, 0x6d, 0x61, 0x74, 0x68, 0x2f, 0x73, 0x64, 0x66, 0x5f, 0x75, 0x74,
+ 0x69, 0x6c, 0x73, 0x22, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x20, 0x42, 0x56, 0x48, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x7b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x6d, 0x69, 0x6e, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33,
+ 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
+ 0x65, 0x66, 0x74, 0x5f, 0x69, 0x64, 0x78, 0x3a, 0x20, 0x69, 0x33, 0x32,
+ 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x78, 0x3a, 0x20, 0x76,
+ 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x6f, 0x62, 0x6a, 0x5f, 0x69, 0x64, 0x78, 0x5f, 0x6f, 0x72,
+ 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x69, 0x33, 0x32, 0x2c,
+ 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x40, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x28,
+ 0x30, 0x29, 0x20, 0x40, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x28,
+ 0x32, 0x29, 0x20, 0x76, 0x61, 0x72, 0x3c, 0x73, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x3e, 0x20, 0x62, 0x76,
+ 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x3a, 0x20, 0x61, 0x72, 0x72,
+ 0x61, 0x79, 0x3c, 0x42, 0x56, 0x48, 0x4e, 0x6f, 0x64, 0x65, 0x3e, 0x3b,
+ 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x73,
+ 0x74, 0x28, 0x70, 0x3a, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c, 0x66, 0x33,
+ 0x32, 0x3e, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x3a, 0x20, 0x66, 0x33, 0x32, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33,
+ 0x32, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
+ 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20,
+ 0x31, 0x2e, 0x30, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
+ 0x6e, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x70, 0x29, 0x20,
+ 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x20, 0x7d, 0x20, 0x2f, 0x2f, 0x20,
+ 0x55, 0x6e, 0x69, 0x74, 0x20, 0x53, 0x70, 0x68, 0x65, 0x72, 0x65, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x2e, 0x30, 0x29,
+ 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x64,
+ 0x42, 0x6f, 0x78, 0x28, 0x70, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x3c,
+ 0x66, 0x33, 0x32, 0x3e, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x20,
+ 0x7d, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x20, 0x42, 0x6f,
+ 0x78, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62,
+ 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x2e,
+ 0x30, 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
+ 0x73, 0x64, 0x54, 0x6f, 0x72, 0x75, 0x73, 0x28, 0x70, 0x2c, 0x20, 0x76,
+ 0x65, 0x63, 0x32, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x31, 0x2e, 0x30,
+ 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x29, 0x29, 0x3b, 0x20, 0x7d, 0x20, 0x2f,
+ 0x2f, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x20, 0x54, 0x6f, 0x72, 0x75, 0x73,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x2e, 0x30,
+ 0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73,
+ 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x28, 0x70, 0x2c, 0x20, 0x76, 0x65,
+ 0x63, 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x30, 0x2e, 0x30, 0x2c,
+ 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20,
+ 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x30, 0x30, 0x2e, 0x30,
+ 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x6d, 0x61, 0x70, 0x5f,
+ 0x73, 0x63, 0x65, 0x6e, 0x65, 0x28, 0x70, 0x3a, 0x20, 0x76, 0x65, 0x63,
+ 0x33, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x2c, 0x20, 0x73, 0x6b, 0x69, 0x70,
+ 0x5f, 0x69, 0x64, 0x78, 0x3a, 0x20, 0x75, 0x33, 0x32, 0x29, 0x20, 0x2d,
+ 0x3e, 0x20, 0x66, 0x33, 0x32, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x76, 0x61, 0x72, 0x20, 0x64, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30,
+ 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20,
+ 0x73, 0x74, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
+ 0x3c, 0x69, 0x33, 0x32, 0x2c, 0x20, 0x33, 0x32, 0x3e, 0x3b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b,
+ 0x5f, 0x70, 0x74, 0x72, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61,
+ 0x72, 0x72, 0x61, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x26,
+ 0x62, 0x76, 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x29, 0x20, 0x3e,
+ 0x20, 0x30, 0x75, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5b, 0x73, 0x74, 0x61,
+ 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x5d, 0x20, 0x3d, 0x20, 0x30, 0x3b,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61,
+ 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x2b, 0x2b, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69,
+ 0x6c, 0x65, 0x20, 0x28, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x74,
+ 0x72, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70,
+ 0x74, 0x72, 0x2d, 0x2d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69,
+ 0x64, 0x78, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5b, 0x73,
+ 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x5d, 0x3b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6e,
+ 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x76, 0x68, 0x5f, 0x6e, 0x6f,
+ 0x64, 0x65, 0x73, 0x5b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x78,
+ 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x69, 0x66, 0x20, 0x28, 0x61, 0x61, 0x62, 0x62, 0x5f, 0x73, 0x64, 0x66,
+ 0x28, 0x70, 0x2c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6d, 0x69, 0x6e,
+ 0x2c, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6d, 0x61, 0x78, 0x29, 0x20,
+ 0x3c, 0x20, 0x64, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e,
+ 0x6f, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x69, 0x64, 0x78,
+ 0x20, 0x3c, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x20, 0x2f, 0x2f, 0x20, 0x4c,
+ 0x65, 0x61, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20,
+ 0x6f, 0x62, 0x6a, 0x5f, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x20, 0x75, 0x33,
+ 0x32, 0x28, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6f, 0x62, 0x6a, 0x5f, 0x69,
+ 0x64, 0x78, 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x29,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62,
+ 0x6a, 0x5f, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x73, 0x6b, 0x69,
+ 0x70, 0x5f, 0x69, 0x64, 0x78, 0x29, 0x20, 0x7b, 0x20, 0x63, 0x6f, 0x6e,
+ 0x74, 0x69, 0x6e, 0x75, 0x65, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x3d, 0x20, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5b, 0x6f, 0x62, 0x6a, 0x5f, 0x69,
+ 0x64, 0x78, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74,
+ 0x20, 0x71, 0x20, 0x3d, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x69, 0x6e,
+ 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x20, 0x2a, 0x20, 0x76, 0x65,
+ 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x70, 0x2c, 0x20, 0x31,
+ 0x2e, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x6d, 0x69,
+ 0x6e, 0x28, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a,
+ 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x2e, 0x78, 0x79,
+ 0x7a, 0x29, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x6c, 0x65, 0x6e, 0x67,
+ 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x5b, 0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x6c, 0x65,
+ 0x6e, 0x67, 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x29,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x20, 0x3d, 0x20, 0x6d, 0x69,
+ 0x6e, 0x28, 0x64, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x73,
+ 0x74, 0x28, 0x71, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x29, 0x3b,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x20, 0x2f, 0x2f,
+ 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f,
+ 0x70, 0x74, 0x72, 0x20, 0x3c, 0x20, 0x33, 0x31, 0x29, 0x20, 0x7b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x63,
+ 0x6b, 0x5b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x5d,
+ 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x66, 0x74,
+ 0x5f, 0x69, 0x64, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x2b,
+ 0x2b, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73,
+ 0x74, 0x61, 0x63, 0x6b, 0x5b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70,
+ 0x74, 0x72, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6f,
+ 0x62, 0x6a, 0x5f, 0x69, 0x64, 0x78, 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x69,
+ 0x67, 0x68, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x74, 0x72, 0x2b, 0x2b,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
+ 0x20, 0x64, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
+};
+const size_t ASSET_SIZE_SHADER_RENDER_SCENE_QUERY_LINEAR = 959;
+alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SCENE_QUERY_LINEAR[] = {
0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x22, 0x6d, 0x61,
0x74, 0x68, 0x2f, 0x73, 0x64, 0x66, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65,
0x73, 0x22, 0x0a, 0x0a, 0x66, 0x6e, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x64,
@@ -371772,51 +371955,29 @@ alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_SCENE_QUERY[] = {
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x6f,
0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x6f, 0x62,
0x6a, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53,
- 0x6b, 0x69, 0x70, 0x20, 0x72, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x7a,
- 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x28,
- 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6c, 0x6f,
- 0x6f, 0x72, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53,
- 0x44, 0x46, 0x20, 0x6d, 0x61, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x20, 0x3c, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20,
- 0x7b, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x3b, 0x20,
- 0x7d, 0x20, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x6c, 0x65, 0x74, 0x20, 0x71, 0x20, 0x3d, 0x20, 0x28, 0x6f, 0x62, 0x6a,
- 0x2e, 0x69, 0x6e, 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x20, 0x2a,
- 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66, 0x33, 0x32, 0x3e, 0x28, 0x70,
- 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x63,
- 0x61, 0x6c, 0x65, 0x5f, 0x78, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
- 0x5b, 0x30, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x63,
- 0x61, 0x6c, 0x65, 0x5f, 0x79, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67,
- 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
- 0x5b, 0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x63,
- 0x61, 0x6c, 0x65, 0x5f, 0x7a, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
+ 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3c, 0x3d, 0x20,
+ 0x30, 0x2e, 0x30, 0x29, 0x20, 0x7b, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69,
+ 0x6e, 0x75, 0x65, 0x3b, 0x20, 0x7d, 0x20, 0x0a, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x71, 0x20, 0x3d,
+ 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x69, 0x6e, 0x76, 0x5f, 0x6d, 0x6f,
+ 0x64, 0x65, 0x6c, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x3c, 0x66,
+ 0x33, 0x32, 0x3e, 0x28, 0x70, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29,
+ 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x6d, 0x69,
+ 0x6e, 0x28, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a,
+ 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x2e, 0x78, 0x79,
+ 0x7a, 0x29, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
- 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65,
- 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x76,
- 0x65, 0x20, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x20, 0x73, 0x63,
- 0x61, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
- 0x20, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x74, 0x65, 0x70, 0x70, 0x69, 0x6e,
- 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x74, 0x20, 0x73, 0x20, 0x3d,
- 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x78,
- 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f,
- 0x79, 0x2c, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x7a, 0x29, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x20, 0x3d, 0x20, 0x6d,
- 0x69, 0x6e, 0x28, 0x64, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x69,
- 0x73, 0x74, 0x28, 0x71, 0x2c, 0x20, 0x6f, 0x62, 0x6a, 0x5f, 0x74, 0x79,
- 0x70, 0x65, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x64, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
+ 0x5b, 0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x6c, 0x65,
+ 0x6e, 0x67, 0x74, 0x68, 0x28, 0x6f, 0x62, 0x6a, 0x2e, 0x6d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x29,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x20,
+ 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x64, 0x2c, 0x20, 0x67, 0x65, 0x74,
+ 0x5f, 0x64, 0x69, 0x73, 0x74, 0x28, 0x71, 0x2c, 0x20, 0x6f, 0x62, 0x6a,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x29, 0x3b,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72,
+ 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x64, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
};
const size_t ASSET_SIZE_SHADER_RENDER_LIGHTING_UTILS = 330;
alignas(16) static const uint8_t ASSET_DATA_SHADER_RENDER_LIGHTING_UTILS[] = {
@@ -371888,13 +372049,14 @@ const AssetRecord* GetAssetRecordTable() {
{ ASSET_DATA_SHADER_MATH_SDF_SHAPES, ASSET_SIZE_SHADER_MATH_SDF_SHAPES, false, nullptr, nullptr, 0 },
{ ASSET_DATA_SHADER_MATH_SDF_UTILS, ASSET_SIZE_SHADER_MATH_SDF_UTILS, false, nullptr, nullptr, 0 },
{ ASSET_DATA_SHADER_RENDER_SHADOWS, ASSET_SIZE_SHADER_RENDER_SHADOWS, false, nullptr, nullptr, 0 },
- { ASSET_DATA_SHADER_RENDER_SCENE_QUERY, ASSET_SIZE_SHADER_RENDER_SCENE_QUERY, false, nullptr, nullptr, 0 },
+ { ASSET_DATA_SHADER_RENDER_SCENE_QUERY_BVH, ASSET_SIZE_SHADER_RENDER_SCENE_QUERY_BVH, false, nullptr, nullptr, 0 },
+ { ASSET_DATA_SHADER_RENDER_SCENE_QUERY_LINEAR, ASSET_SIZE_SHADER_RENDER_SCENE_QUERY_LINEAR, false, nullptr, nullptr, 0 },
{ ASSET_DATA_SHADER_RENDER_LIGHTING_UTILS, ASSET_SIZE_SHADER_RENDER_LIGHTING_UTILS, false, nullptr, nullptr, 0 },
};
return assets;
}
size_t GetAssetCount() {
- return 39;
+ return 40;
}
diff --git a/src/generated/test_assets.h b/src/generated/test_assets.h
index 7b66e75..f5ba129 100644
--- a/src/generated/test_assets.h
+++ b/src/generated/test_assets.h
@@ -9,9 +9,10 @@ enum class AssetId : uint16_t {
ASSET_SHADER_SNIPPET_A = 2,
ASSET_SHADER_SNIPPET_B = 3,
ASSET_PROC_NOISE_256 = 4,
- ASSET_PROC_UNKNOWN = 5,
- ASSET_PROC_FAIL = 6,
- ASSET_LAST_ID = 7,
+ ASSET_TEST_IMAGE = 5,
+ ASSET_PROC_UNKNOWN = 6,
+ ASSET_PROC_FAIL = 7,
+ ASSET_LAST_ID = 8,
};
#include "util/asset_manager.h"
diff --git a/src/generated/test_assets_data.cc b/src/generated/test_assets_data.cc
index bb222f0..03da564 100644
--- a/src/generated/test_assets_data.cc
+++ b/src/generated/test_assets_data.cc
@@ -1,50 +1,55 @@
// This file is auto-generated by asset_packer.cc. Do not edit.
-#include "test_assets.h"
#include "util/asset_manager.h"
-namespace procedural {
-void gen_noise(uint8_t*, int, int, const float*, int);
-}
-namespace procedural {
-void gen_grid(uint8_t*, int, int, const float*, int);
-}
-namespace procedural {
-void make_periodic(uint8_t*, int, int, const float*, int);
-}
+#include "test_assets.h"
+namespace procedural { void gen_noise(uint8_t*, int, int, const float*, int); }
+namespace procedural { void gen_grid(uint8_t*, int, int, const float*, int); }
+namespace procedural { void make_periodic(uint8_t*, int, int, const float*, int); }
const size_t ASSET_SIZE_TEST_ASSET_1 = 101;
alignas(16) static const uint8_t ASSET_DATA_TEST_ASSET_1[] = {
- 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65,
- 0x73, 0x74, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x66, 0x69, 0x6c,
- 0x65, 0x2e, 0x0a, 0x49, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
- 0x6e, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x65, 0x78, 0x74,
- 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72,
- 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, 0x65,
- 0x74, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x79,
- 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x0a, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
- 0x37, 0x38, 0x39, 0x30, 0x0a, 0x00};
+ 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65,
+ 0x73, 0x74, 0x20, 0x61, 0x73, 0x73, 0x65, 0x74, 0x20, 0x66, 0x69, 0x6c,
+ 0x65, 0x2e, 0x0a, 0x49, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
+ 0x6e, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x65, 0x78, 0x74,
+ 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x74, 0x6f, 0x20, 0x76, 0x65, 0x72,
+ 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, 0x65,
+ 0x74, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x79,
+ 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x0a, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x37, 0x38, 0x39, 0x30, 0x0a, 0x00
+};
const size_t ASSET_SIZE_NULL_ASSET = 0;
-alignas(16) static const uint8_t ASSET_DATA_NULL_ASSET[] = {0x00};
+alignas(16) static const uint8_t ASSET_DATA_NULL_ASSET[] = {
+ 0x00
+};
const size_t ASSET_SIZE_SHADER_SNIPPET_A = 65;
alignas(16) static const uint8_t ASSET_DATA_SHADER_SNIPPET_A[] = {
- 0x2f, 0x2f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x69,
- 0x70, 0x70, 0x65, 0x74, 0x5f, 0x61, 0x2e, 0x77, 0x67, 0x73, 0x6c,
- 0x0a, 0x66, 0x6e, 0x20, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74,
- 0x5f, 0x61, 0x28, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33, 0x32,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00};
+ 0x2f, 0x2f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x69, 0x70,
+ 0x70, 0x65, 0x74, 0x5f, 0x61, 0x2e, 0x77, 0x67, 0x73, 0x6c, 0x0a, 0x66,
+ 0x6e, 0x20, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x5f, 0x61, 0x28,
+ 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33, 0x32, 0x20, 0x7b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x2e,
+ 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
+};
const size_t ASSET_SIZE_SHADER_SNIPPET_B = 65;
alignas(16) static const uint8_t ASSET_DATA_SHADER_SNIPPET_B[] = {
- 0x2f, 0x2f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x69,
- 0x70, 0x70, 0x65, 0x74, 0x5f, 0x62, 0x2e, 0x77, 0x67, 0x73, 0x6c,
- 0x0a, 0x66, 0x6e, 0x20, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74,
- 0x5f, 0x62, 0x28, 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33, 0x32,
- 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x20, 0x32, 0x2e, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00};
+ 0x2f, 0x2f, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6e, 0x69, 0x70,
+ 0x70, 0x65, 0x74, 0x5f, 0x62, 0x2e, 0x77, 0x67, 0x73, 0x6c, 0x0a, 0x66,
+ 0x6e, 0x20, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x5f, 0x62, 0x28,
+ 0x29, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x33, 0x32, 0x20, 0x7b, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x32, 0x2e,
+ 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x00
+};
static const float ASSET_PROC_PARAMS_PROC_NOISE_256[] = {4321.000000, 8.000000};
static const char* ASSET_PROC_FUNC_STR_PROC_NOISE_256 = "gen_noise";
+const size_t ASSET_SIZE_TEST_IMAGE = 24;
+alignas(16) static const uint8_t ASSET_DATA_TEST_IMAGE[] = {
+ 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
+ 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00
+};
static const float ASSET_PROC_PARAMS_PROC_UNKNOWN[] = {0.000000};
static const char* ASSET_PROC_FUNC_STR_PROC_UNKNOWN = "gen_unknown_func";
@@ -55,24 +60,19 @@ static const char* ASSET_PROC_FUNC_STR_PROC_FAIL = "gen_noise";
const AssetRecord* GetAssetRecordTable() {
static const AssetRecord assets[] = {
- {ASSET_DATA_TEST_ASSET_1, ASSET_SIZE_TEST_ASSET_1, false, nullptr,
- nullptr, 0},
- {ASSET_DATA_NULL_ASSET, ASSET_SIZE_NULL_ASSET, false, nullptr, nullptr,
- 0},
- {ASSET_DATA_SHADER_SNIPPET_A, ASSET_SIZE_SHADER_SNIPPET_A, false, nullptr,
- nullptr, 0},
- {ASSET_DATA_SHADER_SNIPPET_B, ASSET_SIZE_SHADER_SNIPPET_B, false, nullptr,
- nullptr, 0},
- {nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_NOISE_256,
- ASSET_PROC_PARAMS_PROC_NOISE_256, 2},
- {nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_UNKNOWN,
- ASSET_PROC_PARAMS_PROC_UNKNOWN, 1},
- {nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_FAIL,
- ASSET_PROC_PARAMS_PROC_FAIL, 2},
+ { ASSET_DATA_TEST_ASSET_1, ASSET_SIZE_TEST_ASSET_1, false, nullptr, nullptr, 0 },
+ { ASSET_DATA_NULL_ASSET, ASSET_SIZE_NULL_ASSET, false, nullptr, nullptr, 0 },
+ { ASSET_DATA_SHADER_SNIPPET_A, ASSET_SIZE_SHADER_SNIPPET_A, false, nullptr, nullptr, 0 },
+ { ASSET_DATA_SHADER_SNIPPET_B, ASSET_SIZE_SHADER_SNIPPET_B, false, nullptr, nullptr, 0 },
+ { nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_NOISE_256, ASSET_PROC_PARAMS_PROC_NOISE_256, 2 },
+ { ASSET_DATA_TEST_IMAGE, ASSET_SIZE_TEST_IMAGE, false, nullptr, nullptr, 0 },
+ { nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_UNKNOWN, ASSET_PROC_PARAMS_PROC_UNKNOWN, 1 },
+ { nullptr, 0, true, ASSET_PROC_FUNC_STR_PROC_FAIL, ASSET_PROC_PARAMS_PROC_FAIL, 2 },
};
return assets;
}
size_t GetAssetCount() {
- return 7;
+ return 8;
}
+
diff --git a/src/gpu/effects/shader_composer.cc b/src/gpu/effects/shader_composer.cc
index 8d66ad7..055b996 100644
--- a/src/gpu/effects/shader_composer.cc
+++ b/src/gpu/effects/shader_composer.cc
@@ -17,7 +17,8 @@ void ShaderComposer::RegisterSnippet(const std::string& name,
void ShaderComposer::ResolveRecursive(const std::string& source,
std::stringstream& ss,
- std::set<std::string>& included) {
+ std::set<std::string>& included,
+ const CompositionMap& substitutions) {
std::istringstream stream(source);
std::string line;
while (std::getline(stream, line)) {
@@ -27,12 +28,19 @@ void ShaderComposer::ResolveRecursive(const std::string& source,
size_t end = line.find('"', start + 1);
if (start != std::string::npos && end != std::string::npos) {
std::string name = line.substr(start + 1, end - start - 1);
+
+ // Apply substitution if available
+ auto sub_it = substitutions.find(name);
+ if (sub_it != substitutions.end()) {
+ name = sub_it->second;
+ }
+
if (included.find(name) == included.end()) {
included.insert(name);
auto it = snippets_.find(name);
if (it != snippets_.end()) {
ss << "// --- Included: " << name << " ---\n";
- ResolveRecursive(it->second, ss, included);
+ ResolveRecursive(it->second, ss, included, substitutions);
ss << "// --- End Include: " << name << " ---\n";
} else {
ss << "// ERROR: Snippet not found: " << name << "\n";
@@ -47,7 +55,8 @@ void ShaderComposer::ResolveRecursive(const std::string& source,
std::string
ShaderComposer::Compose(const std::vector<std::string>& dependencies,
- const std::string& main_code) {
+ const std::string& main_code,
+ const CompositionMap& substitutions) {
std::stringstream ss;
ss << "// Generated by ShaderComposer\n\n";
@@ -55,19 +64,25 @@ ShaderComposer::Compose(const std::vector<std::string>& dependencies,
// Process explicit dependencies first
for (const auto& dep : dependencies) {
- if (included.find(dep) == included.end()) {
- included.insert(dep);
- auto it = snippets_.find(dep);
+ std::string name = dep;
+ auto sub_it = substitutions.find(name);
+ if (sub_it != substitutions.end()) {
+ name = sub_it->second;
+ }
+
+ if (included.find(name) == included.end()) {
+ included.insert(name);
+ auto it = snippets_.find(name);
if (it != snippets_.end()) {
- ss << "// --- Dependency: " << dep << " ---\n";
- ResolveRecursive(it->second, ss, included);
+ ss << "// --- Dependency: " << name << " ---\n";
+ ResolveRecursive(it->second, ss, included, substitutions);
ss << "\n";
}
}
}
ss << "// --- Main Code ---\n";
- ResolveRecursive(main_code, ss, included);
+ ResolveRecursive(main_code, ss, included, substitutions);
return ss.str();
}
diff --git a/src/gpu/effects/shader_composer.h b/src/gpu/effects/shader_composer.h
index a63a6a4..9eb43f4 100644
--- a/src/gpu/effects/shader_composer.h
+++ b/src/gpu/effects/shader_composer.h
@@ -15,16 +15,21 @@ class ShaderComposer {
// Register a snippet (e.g. "common_math", "sdf_primitives")
void RegisterSnippet(const std::string& name, const std::string& code);
+ using CompositionMap = std::map<std::string, std::string>;
+
// Assemble a final shader string by prepending required snippets
// and recursively resolving #include "snippet_name" directives.
+ // Optional substitutions: map "placeholder_name" -> "actual_snippet_name"
std::string Compose(const std::vector<std::string>& dependencies,
- const std::string& main_code);
+ const std::string& main_code,
+ const CompositionMap& substitutions = {});
private:
ShaderComposer() = default;
void ResolveRecursive(const std::string& source, std::stringstream& ss,
- std::set<std::string>& included);
+ std::set<std::string>& included,
+ const CompositionMap& substitutions);
std::map<std::string, std::string> snippets_;
};
diff --git a/src/gpu/effects/shaders.cc b/src/gpu/effects/shaders.cc
index 7b543e1..4fc8108 100644
--- a/src/gpu/effects/shaders.cc
+++ b/src/gpu/effects/shaders.cc
@@ -34,8 +34,10 @@ void InitShaderComposer() {
register_if_exists("math/sdf_shapes", AssetId::ASSET_SHADER_MATH_SDF_SHAPES);
register_if_exists("math/sdf_utils", AssetId::ASSET_SHADER_MATH_SDF_UTILS);
register_if_exists("render/shadows", AssetId::ASSET_SHADER_RENDER_SHADOWS);
- register_if_exists("render/scene_query",
- AssetId::ASSET_SHADER_RENDER_SCENE_QUERY);
+ register_if_exists("render/scene_query_bvh",
+ AssetId::ASSET_SHADER_RENDER_SCENE_QUERY_BVH);
+ register_if_exists("render/scene_query_linear",
+ AssetId::ASSET_SHADER_RENDER_SCENE_QUERY_LINEAR);
register_if_exists("render/lighting_utils",
AssetId::ASSET_SHADER_RENDER_LIGHTING_UTILS);
diff --git a/src/tests/test_3d_physics.cc b/src/tests/test_3d_physics.cc
index 84be333..0dfe1ce 100644
--- a/src/tests/test_3d_physics.cc
+++ b/src/tests/test_3d_physics.cc
@@ -194,6 +194,9 @@ int main(int argc, char** argv) {
if (strcmp(argv[i], "--debug") == 0) {
Renderer3D::SetDebugEnabled(true);
}
+ if (strcmp(argv[i], "--no-bvh") == 0) {
+ g_renderer.SetBvhEnabled(false);
+ }
}
#else
(void)argc;
diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc
index 002cb55..f8bbaa7 100644
--- a/src/tests/test_3d_render.cc
+++ b/src/tests/test_3d_render.cc
@@ -183,6 +183,9 @@ int main(int argc, char** argv) {
if (strcmp(argv[i], "--debug") == 0) {
Renderer3D::SetDebugEnabled(true);
}
+ if (strcmp(argv[i], "--no-bvh") == 0) {
+ g_renderer.SetBvhEnabled(false);
+ }
}
#else
(void)argc;