From 262eef377e338bc9e93f5f3622f351a8fa1fb459 Mon Sep 17 00:00:00 2001 From: StillHammer Date: Thu, 27 Nov 2025 19:27:25 +0800 Subject: [PATCH] feat(BgfxRenderer): Phase 5.5 - Sprite shader with instancing and texture support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create proper sprite shader (vs_sprite.sc, fs_sprite.sc) with GPU instancing - SpriteInstance struct now 80 bytes (5 x vec4) for GPU layout compatibility - Add BufferDesc::Layout enum (Raw, PosColor, InstanceData) for proper vertex layouts - BgfxDevice creates correct VertexLayout based on buffer type - SpritePass uses PosColor layout for quad vertices (Position + Color0) - Instance buffer uses 5 x vec4 layout (TexCoord7-3) for i_data0-4 - Add texture support with v_texcoord0 interpolation from instance UVs - Create default white 1x1 texture fallback - Compile shaders for SPIRV (Vulkan), GLSL (OpenGL), and Metal Visual test confirms sprites render correctly at ~545 FPS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/BgfxRenderer/CMakeLists.txt | 121 +++++- modules/BgfxRenderer/Frame/FramePacket.h | 23 +- modules/BgfxRenderer/Passes/SpritePass.cpp | 32 +- modules/BgfxRenderer/Passes/SpritePass.h | 1 + modules/BgfxRenderer/RHI/BgfxDevice.cpp | 39 +- modules/BgfxRenderer/RHI/RHITypes.h | 6 + modules/BgfxRenderer/Scene/SceneCollector.cpp | 20 +- .../BgfxRenderer/Shaders/ShaderManager.cpp | 52 ++- modules/BgfxRenderer/Shaders/ShaderManager.h | 1 + .../Shaders/compiled/fs_sprite.glsl.bin | Bin 0 -> 204 bytes .../Shaders/compiled/fs_sprite.mtl.bin | Bin 0 -> 644 bytes .../Shaders/compiled/fs_sprite.spirv.bin | Bin 0 -> 863 bytes .../Shaders/compiled/fs_sprite_glsl.bin | Bin 0 -> 2134 bytes .../Shaders/compiled/fs_sprite_glsl.bin.inc | 20 + .../Shaders/compiled/fs_sprite_mtl.bin | Bin 0 -> 386 bytes .../Shaders/compiled/fs_sprite_mtl.bin.inc | 57 +++ .../Shaders/compiled/fs_sprite_spirv.bin | Bin 0 -> 406 bytes .../Shaders/compiled/fs_sprite_spirv.bin.inc | 75 ++++ .../Shaders/compiled/vs_sprite.glsl.bin | Bin 0 -> 916 bytes .../Shaders/compiled/vs_sprite.mtl.bin | Bin 0 -> 1295 bytes .../Shaders/compiled/vs_sprite.spirv.bin | Bin 0 -> 2109 bytes .../Shaders/compiled/vs_sprite_glsl.bin | Bin 0 -> 2627 bytes .../Shaders/compiled/vs_sprite_glsl.bin.inc | 80 ++++ .../Shaders/compiled/vs_sprite_mtl.bin | Bin 0 -> 1078 bytes .../Shaders/compiled/vs_sprite_mtl.bin.inc | 111 ++++++ .../Shaders/compiled/vs_sprite_spirv.bin | Bin 0 -> 1757 bytes .../Shaders/compiled/vs_sprite_spirv.bin.inc | 179 +++++++++ modules/BgfxRenderer/Shaders/fs_sprite.bin.h | 157 ++++++++ modules/BgfxRenderer/Shaders/fs_sprite.sc | 12 + modules/BgfxRenderer/Shaders/varying.def.sc | 14 +- modules/BgfxRenderer/Shaders/vs_sprite.bin.h | 375 ++++++++++++++++++ modules/BgfxRenderer/Shaders/vs_sprite.sc | 45 +++ tests/integration/test_20_bgfx_rhi.cpp | 16 +- 33 files changed, 1391 insertions(+), 45 deletions(-) create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite.glsl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite.mtl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite.spirv.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_glsl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_glsl.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite.glsl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite.mtl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite.spirv.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin create mode 100644 modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin.inc create mode 100644 modules/BgfxRenderer/Shaders/fs_sprite.bin.h create mode 100644 modules/BgfxRenderer/Shaders/fs_sprite.sc create mode 100644 modules/BgfxRenderer/Shaders/vs_sprite.bin.h create mode 100644 modules/BgfxRenderer/Shaders/vs_sprite.sc diff --git a/modules/BgfxRenderer/CMakeLists.txt b/modules/BgfxRenderer/CMakeLists.txt index 4c9b777..06cead2 100644 --- a/modules/BgfxRenderer/CMakeLists.txt +++ b/modules/BgfxRenderer/CMakeLists.txt @@ -18,7 +18,8 @@ FetchContent_Declare( ) # bgfx options -set(BGFX_BUILD_TOOLS OFF CACHE BOOL "" FORCE) +set(BGFX_BUILD_TOOLS ON CACHE BOOL "" FORCE) # Need shaderc for shader compilation +set(BGFX_BUILD_TOOLS_SHADER ON CACHE BOOL "" FORCE) set(BGFX_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(BGFX_INSTALL OFF CACHE BOOL "" FORCE) set(BGFX_CUSTOM_TARGETS OFF CACHE BOOL "" FORCE) @@ -105,3 +106,121 @@ if(APPLE) "-framework Metal" ) endif() + +# ============================================================================ +# Shader Compilation +# ============================================================================ + +set(BGFX_SHADER_INCLUDE_DIR ${bgfx_SOURCE_DIR}/bgfx/src) +set(SHADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Shaders) + +# Function to compile a shader +function(compile_bgfx_shader SHADER_NAME SHADER_TYPE OUTPUT_VAR) + set(INPUT_FILE ${SHADER_DIR}/${SHADER_NAME}.sc) + set(OUTPUT_DIR ${SHADER_DIR}) + set(VARYING_DEF ${SHADER_DIR}/varying.def.sc) + + # Output files for each platform + set(OUTPUT_SPIRV ${OUTPUT_DIR}/${SHADER_NAME}_spirv.bin) + set(OUTPUT_GLSL ${OUTPUT_DIR}/${SHADER_NAME}_glsl.bin) + set(OUTPUT_ESSL ${OUTPUT_DIR}/${SHADER_NAME}_essl.bin) + set(OUTPUT_DX11 ${OUTPUT_DIR}/${SHADER_NAME}_dx11.bin) + set(OUTPUT_MTL ${OUTPUT_DIR}/${SHADER_NAME}_mtl.bin) + + if(SHADER_TYPE STREQUAL "vertex") + set(SHADER_MODEL vs_5_0) + set(SHADER_PROFILE 430) + else() + set(SHADER_MODEL ps_5_0) + set(SHADER_PROFILE 430) + endif() + + # Compile for Vulkan (SPIR-V) + add_custom_command( + OUTPUT ${OUTPUT_SPIRV} + COMMAND shaderc + -f ${INPUT_FILE} + -o ${OUTPUT_SPIRV} + --type ${SHADER_TYPE} + --platform linux + --profile spirv + -i ${BGFX_SHADER_INCLUDE_DIR} + --varyingdef ${VARYING_DEF} + DEPENDS ${INPUT_FILE} ${VARYING_DEF} shaderc + COMMENT "Compiling ${SHADER_NAME} for SPIR-V" + ) + + # Compile for OpenGL + add_custom_command( + OUTPUT ${OUTPUT_GLSL} + COMMAND shaderc + -f ${INPUT_FILE} + -o ${OUTPUT_GLSL} + --type ${SHADER_TYPE} + --platform linux + --profile ${SHADER_PROFILE} + -i ${BGFX_SHADER_INCLUDE_DIR} + --varyingdef ${VARYING_DEF} + DEPENDS ${INPUT_FILE} ${VARYING_DEF} shaderc + COMMENT "Compiling ${SHADER_NAME} for GLSL" + ) + + # Compile for OpenGL ES + add_custom_command( + OUTPUT ${OUTPUT_ESSL} + COMMAND shaderc + -f ${INPUT_FILE} + -o ${OUTPUT_ESSL} + --type ${SHADER_TYPE} + --platform android + -i ${BGFX_SHADER_INCLUDE_DIR} + --varyingdef ${VARYING_DEF} + DEPENDS ${INPUT_FILE} ${VARYING_DEF} shaderc + COMMENT "Compiling ${SHADER_NAME} for ESSL" + ) + + # Compile for DirectX 11 + add_custom_command( + OUTPUT ${OUTPUT_DX11} + COMMAND shaderc + -f ${INPUT_FILE} + -o ${OUTPUT_DX11} + --type ${SHADER_TYPE} + --platform windows + --profile ${SHADER_MODEL} + -i ${BGFX_SHADER_INCLUDE_DIR} + --varyingdef ${VARYING_DEF} + DEPENDS ${INPUT_FILE} ${VARYING_DEF} shaderc + COMMENT "Compiling ${SHADER_NAME} for DX11" + ) + + # Compile for Metal + add_custom_command( + OUTPUT ${OUTPUT_MTL} + COMMAND shaderc + -f ${INPUT_FILE} + -o ${OUTPUT_MTL} + --type ${SHADER_TYPE} + --platform osx + --profile metal + -i ${BGFX_SHADER_INCLUDE_DIR} + --varyingdef ${VARYING_DEF} + DEPENDS ${INPUT_FILE} ${VARYING_DEF} shaderc + COMMENT "Compiling ${SHADER_NAME} for Metal" + ) + + set(${OUTPUT_VAR} ${OUTPUT_SPIRV} ${OUTPUT_GLSL} ${OUTPUT_ESSL} ${OUTPUT_DX11} ${OUTPUT_MTL} PARENT_SCOPE) +endfunction() + +# Compile sprite shaders +compile_bgfx_shader(vs_sprite vertex VS_SPRITE_OUTPUTS) +compile_bgfx_shader(fs_sprite fragment FS_SPRITE_OUTPUTS) + +# Custom target to compile all shaders +add_custom_target(compile_shaders + DEPENDS ${VS_SPRITE_OUTPUTS} ${FS_SPRITE_OUTPUTS} + COMMENT "Compiling all BgfxRenderer shaders" +) + +# Make BgfxRenderer depend on shaders (optional, enable if you want auto-compilation) +# add_dependencies(BgfxRenderer compile_shaders) diff --git a/modules/BgfxRenderer/Frame/FramePacket.h b/modules/BgfxRenderer/Frame/FramePacket.h index 2d24c57..aa180cb 100644 --- a/modules/BgfxRenderer/Frame/FramePacket.h +++ b/modules/BgfxRenderer/Frame/FramePacket.h @@ -11,15 +11,30 @@ class FrameAllocator; // Sprite Instance Data // ============================================================================ +// GPU Instance data - must match shader layout (5 x vec4 = 80 bytes) +// i_data0: x, y, scaleX, scaleY +// i_data1: rotation, u0, v0, u1 +// i_data2: v1, textureId (as float), layer (as float), padding +// i_data3: reserved +// i_data4: r, g, b, a (color as floats 0-1) struct SpriteInstance { + // i_data0 float x, y; // Position float scaleX, scaleY; // Scale + // i_data1 float rotation; // Radians - float u0, v0, u1, v1; // UVs in atlas - uint32_t color; // RGBA packed - uint16_t textureId; // Index in texture array - uint16_t layer; // Z-order + float u0, v0, u1; // UV start + end x + // i_data2 + float v1; // UV end y + float textureId; // As float for GPU compatibility + float layer; // Z-order as float + float padding0; + // i_data3 + float reserved[4]; // Reserved for future use + // i_data4 + float r, g, b, a; // Color as floats (0-1) }; +static_assert(sizeof(SpriteInstance) == 80, "SpriteInstance must be 80 bytes for GPU instancing"); // ============================================================================ // Tilemap Chunk Data diff --git a/modules/BgfxRenderer/Passes/SpritePass.cpp b/modules/BgfxRenderer/Passes/SpritePass.cpp index 68f453f..77c8f45 100644 --- a/modules/BgfxRenderer/Passes/SpritePass.cpp +++ b/modules/BgfxRenderer/Passes/SpritePass.cpp @@ -11,13 +11,14 @@ SpritePass::SpritePass(rhi::ShaderHandle shader) void SpritePass::setup(rhi::IRHIDevice& device) { // Create quad vertex buffer (unit quad, instanced) - // Positions: 4 vertices for a quad + // Layout must match shader: a_position (vec3) + a_color0 (vec4) + // Note: Color is white (1,1,1,1) - actual color comes from instance data float quadVertices[] = { - // pos.x, pos.y, uv.x, uv.y - 0.0f, 0.0f, 0.0f, 0.0f, // bottom-left - 1.0f, 0.0f, 1.0f, 0.0f, // bottom-right - 1.0f, 1.0f, 1.0f, 1.0f, // top-right - 0.0f, 1.0f, 0.0f, 1.0f, // top-left + // pos.x, pos.y, pos.z, r, g, b, a + 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, // bottom-left + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, // bottom-right + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, // top-right + 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, // top-left }; rhi::BufferDesc vbDesc; @@ -25,6 +26,7 @@ void SpritePass::setup(rhi::IRHIDevice& device) { vbDesc.size = sizeof(quadVertices); vbDesc.data = quadVertices; vbDesc.dynamic = false; + vbDesc.layout = rhi::BufferDesc::PosColor; // Match shader: a_position + a_color0 m_quadVB = device.createBuffer(vbDesc); // Create index buffer @@ -48,8 +50,18 @@ void SpritePass::setup(rhi::IRHIDevice& device) { instDesc.dynamic = true; m_instanceBuffer = device.createBuffer(instDesc); - // Create texture sampler uniform - m_textureSampler = device.createUniform("s_texture", 1); + // Create texture sampler uniform (must match shader: s_texColor) + m_textureSampler = device.createUniform("s_texColor", 1); + + // Create default white 1x1 texture (used when no texture is bound) + uint32_t whitePixel = 0xFFFFFFFF; // RGBA white + rhi::TextureDesc texDesc; + texDesc.width = 1; + texDesc.height = 1; + texDesc.format = rhi::TextureDesc::RGBA8; + texDesc.data = &whitePixel; + texDesc.dataSize = sizeof(whitePixel); + m_defaultTexture = device.createTexture(texDesc); } void SpritePass::shutdown(rhi::IRHIDevice& device) { @@ -57,6 +69,7 @@ void SpritePass::shutdown(rhi::IRHIDevice& device) { device.destroy(m_quadIB); device.destroy(m_instanceBuffer); device.destroy(m_textureSampler); + device.destroy(m_defaultTexture); // Note: m_shader is owned by ShaderManager, not destroyed here } @@ -91,6 +104,9 @@ void SpritePass::execute(const FramePacket& frame, rhi::IRHIDevice& device, rhi: cmd.setIndexBuffer(m_quadIB); cmd.setInstanceBuffer(m_instanceBuffer, 0, static_cast(batchSize)); + // Bind default texture (TODO: support per-sprite textures via texture array) + cmd.setTexture(0, m_defaultTexture, m_textureSampler); + // Submit draw call cmd.drawInstanced(6, static_cast(batchSize)); // 6 indices per quad cmd.submit(0, m_shader, 0); diff --git a/modules/BgfxRenderer/Passes/SpritePass.h b/modules/BgfxRenderer/Passes/SpritePass.h index bf0f3a0..ac40cee 100644 --- a/modules/BgfxRenderer/Passes/SpritePass.h +++ b/modules/BgfxRenderer/Passes/SpritePass.h @@ -31,6 +31,7 @@ private: rhi::BufferHandle m_quadIB; rhi::BufferHandle m_instanceBuffer; rhi::UniformHandle m_textureSampler; + rhi::TextureHandle m_defaultTexture; // White 1x1 texture fallback static constexpr uint32_t MAX_SPRITES_PER_BATCH = 10000; }; diff --git a/modules/BgfxRenderer/RHI/BgfxDevice.cpp b/modules/BgfxRenderer/RHI/BgfxDevice.cpp index 049d24e..c34f034 100644 --- a/modules/BgfxRenderer/RHI/BgfxDevice.cpp +++ b/modules/BgfxRenderer/RHI/BgfxDevice.cpp @@ -105,22 +105,27 @@ public: BufferHandle result; if (desc.type == BufferDesc::Vertex) { - if (desc.dynamic) { - // Dynamic vertex buffer - create with initial size (will resize on update) - // Use 1-byte vertex layout to treat as raw bytes - bgfx::VertexLayout layout; + // Build vertex layout based on layout type + bgfx::VertexLayout layout; + if (desc.layout == BufferDesc::PosColor) { + // vec3 position + vec4 color (7 floats = 28 bytes per vertex) + layout.begin() + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Float, true) // normalized + .end(); + } else { + // Raw bytes - use 1-byte layout layout.begin().add(bgfx::Attrib::Position, 1, bgfx::AttribType::Uint8).end(); + } + + if (desc.dynamic) { bgfx::DynamicVertexBufferHandle dvb = bgfx::createDynamicVertexBuffer( - desc.size, // number of 1-byte "vertices" = size in bytes + desc.layout == BufferDesc::PosColor ? desc.size / layout.getStride() : desc.size, layout, BGFX_BUFFER_ALLOW_RESIZE ); - // Store as dynamic (high bit set) result.id = dvb.idx | 0x8000; } else { - // Static vertex buffer with data - bgfx::VertexLayout layout; - layout.begin().add(bgfx::Attrib::Position, 1, bgfx::AttribType::Uint8).end(); bgfx::VertexBufferHandle vb = bgfx::createVertexBuffer( desc.data ? bgfx::copy(desc.data, desc.size) : bgfx::makeRef(s_emptyBuffer, 1), layout @@ -141,11 +146,21 @@ public: result.id = ib.idx; } } else { // Instance buffer - treated as dynamic vertex buffer - // For instance buffers, use same approach as dynamic vertex + // Instance buffer layout: 5 x vec4 = 80 bytes per instance + // i_data0 (TEXCOORD7), i_data1 (TEXCOORD6), i_data2 (TEXCOORD5), + // i_data3 (TEXCOORD4), i_data4 (TEXCOORD3) bgfx::VertexLayout layout; - layout.begin().add(bgfx::Attrib::Position, 1, bgfx::AttribType::Uint8).end(); + layout.begin() + .add(bgfx::Attrib::TexCoord7, 4, bgfx::AttribType::Float) // i_data0: pos.xy, scale.xy + .add(bgfx::Attrib::TexCoord6, 4, bgfx::AttribType::Float) // i_data1: rotation, uv0.xy, unused + .add(bgfx::Attrib::TexCoord5, 4, bgfx::AttribType::Float) // i_data2: uv1.xy, unused, unused + .add(bgfx::Attrib::TexCoord4, 4, bgfx::AttribType::Float) // i_data3: reserved + .add(bgfx::Attrib::TexCoord3, 4, bgfx::AttribType::Float) // i_data4: color rgba + .end(); + // 80 bytes per instance + uint32_t instanceCount = desc.size / 80; bgfx::DynamicVertexBufferHandle dvb = bgfx::createDynamicVertexBuffer( - desc.size, + instanceCount, layout, BGFX_BUFFER_ALLOW_RESIZE ); diff --git a/modules/BgfxRenderer/RHI/RHITypes.h b/modules/BgfxRenderer/RHI/RHITypes.h index c29faab..37913ee 100644 --- a/modules/BgfxRenderer/RHI/RHITypes.h +++ b/modules/BgfxRenderer/RHI/RHITypes.h @@ -94,6 +94,12 @@ struct BufferDesc { const void* data = nullptr; bool dynamic = false; enum Type : uint8_t { Vertex, Index, Instance } type = Vertex; + // For Vertex buffers, specify the layout type + enum Layout : uint8_t { + Raw, // Raw bytes (no layout - legacy) + PosColor, // vec3 position + vec4 color (for sprites) + InstanceData // Instance buffer (36 bytes per instance) + } layout = Raw; }; struct ShaderDesc { diff --git a/modules/BgfxRenderer/Scene/SceneCollector.cpp b/modules/BgfxRenderer/Scene/SceneCollector.cpp index 48b7872..11b6b4a 100644 --- a/modules/BgfxRenderer/Scene/SceneCollector.cpp +++ b/modules/BgfxRenderer/Scene/SceneCollector.cpp @@ -160,18 +160,32 @@ void SceneCollector::clear() { void SceneCollector::parseSprite(const IDataNode& data) { SpriteInstance sprite; + // i_data0 sprite.x = static_cast(data.getDouble("x", 0.0)); sprite.y = static_cast(data.getDouble("y", 0.0)); sprite.scaleX = static_cast(data.getDouble("scaleX", 1.0)); sprite.scaleY = static_cast(data.getDouble("scaleY", 1.0)); + // i_data1 sprite.rotation = static_cast(data.getDouble("rotation", 0.0)); sprite.u0 = static_cast(data.getDouble("u0", 0.0)); sprite.v0 = static_cast(data.getDouble("v0", 0.0)); sprite.u1 = static_cast(data.getDouble("u1", 1.0)); + // i_data2 sprite.v1 = static_cast(data.getDouble("v1", 1.0)); - sprite.color = static_cast(data.getInt("color", 0xFFFFFFFF)); - sprite.textureId = static_cast(data.getInt("textureId", 0)); - sprite.layer = static_cast(data.getInt("layer", 0)); + sprite.textureId = static_cast(data.getInt("textureId", 0)); + sprite.layer = static_cast(data.getInt("layer", 0)); + sprite.padding0 = 0.0f; + // i_data3 (reserved) + sprite.reserved[0] = 0.0f; + sprite.reserved[1] = 0.0f; + sprite.reserved[2] = 0.0f; + sprite.reserved[3] = 0.0f; + // i_data4 (color as floats) + uint32_t color = static_cast(data.getInt("color", 0xFFFFFFFF)); + sprite.r = static_cast((color >> 24) & 0xFF) / 255.0f; + sprite.g = static_cast((color >> 16) & 0xFF) / 255.0f; + sprite.b = static_cast((color >> 8) & 0xFF) / 255.0f; + sprite.a = static_cast(color & 0xFF) / 255.0f; m_sprites.push_back(sprite); } diff --git a/modules/BgfxRenderer/Shaders/ShaderManager.cpp b/modules/BgfxRenderer/Shaders/ShaderManager.cpp index 7c14bad..742a819 100644 --- a/modules/BgfxRenderer/Shaders/ShaderManager.cpp +++ b/modules/BgfxRenderer/Shaders/ShaderManager.cpp @@ -4,6 +4,8 @@ // Embedded shader bytecode #include "vs_color.bin.h" #include "fs_color.bin.h" +#include "vs_sprite.bin.h" +#include "fs_sprite.bin.h" namespace grove { @@ -94,15 +96,53 @@ void ShaderManager::loadBuiltinShaders(rhi::IRHIDevice& device, const std::strin if (colorProgram.isValid()) { m_programs["color"] = colorProgram; - // Alias for sprites (same shader for now) - m_programs["sprite"] = colorProgram; m_programs["debug"] = colorProgram; } - // TODO: Add more specialized shaders as needed: - // - "sprite_textured" for textured sprites - // - "text" for text rendering - // - "particle" for particle systems + // Load sprite instancing shader + loadSpriteShader(device, rendererName); +} + +void ShaderManager::loadSpriteShader(rhi::IRHIDevice& device, const std::string& rendererName) { + const uint8_t* vsData = nullptr; + uint32_t vsSize = 0; + const uint8_t* fsData = nullptr; + uint32_t fsSize = 0; + + if (rendererName == "OpenGL") { + vsData = vs_sprite_glsl; + vsSize = sizeof(vs_sprite_glsl); + fsData = fs_sprite_glsl; + fsSize = sizeof(fs_sprite_glsl); + } else if (rendererName == "Vulkan") { + vsData = vs_sprite_spv; + vsSize = sizeof(vs_sprite_spv); + fsData = fs_sprite_spv; + fsSize = sizeof(fs_sprite_spv); + } else if (rendererName == "Metal") { + vsData = vs_sprite_mtl; + vsSize = sizeof(vs_sprite_mtl); + fsData = fs_sprite_mtl; + fsSize = sizeof(fs_sprite_mtl); + } else { + // Fallback to Vulkan (most common in WSL2) + vsData = vs_sprite_spv; + vsSize = sizeof(vs_sprite_spv); + fsData = fs_sprite_spv; + fsSize = sizeof(fs_sprite_spv); + } + + rhi::ShaderDesc shaderDesc; + shaderDesc.vsData = vsData; + shaderDesc.vsSize = vsSize; + shaderDesc.fsData = fsData; + shaderDesc.fsSize = fsSize; + + rhi::ShaderHandle spriteProgram = device.createShader(shaderDesc); + + if (spriteProgram.isValid()) { + m_programs["sprite"] = spriteProgram; + } } } // namespace grove diff --git a/modules/BgfxRenderer/Shaders/ShaderManager.h b/modules/BgfxRenderer/Shaders/ShaderManager.h index 8697ae6..fb1b5f6 100644 --- a/modules/BgfxRenderer/Shaders/ShaderManager.h +++ b/modules/BgfxRenderer/Shaders/ShaderManager.h @@ -57,6 +57,7 @@ public: private: void loadBuiltinShaders(rhi::IRHIDevice& device, const std::string& rendererName); + void loadSpriteShader(rhi::IRHIDevice& device, const std::string& rendererName); std::unordered_map m_programs; bool m_initialized = false; diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite.glsl.bin b/modules/BgfxRenderer/Shaders/compiled/fs_sprite.glsl.bin new file mode 100644 index 0000000000000000000000000000000000000000..5e70bb2f3dee63e7c3eeb6a7bdd92b5b0e5ef0e2 GIT binary patch literal 204 zcmZ<@_TXl0{`8Om2pAc-isMUCE1dIl@{52x5CVcFKwOqsRGFEVu27bmY@$#WpA1rA zV9kXjYy=br>P^niFG>N*l;&lo9%*<2J(B!J- uQcy_GiFYeXOb6SnV5^`3G^wPtC>5wp1EEg`*$PbsEx1E8t+{HsxEKK5nLrW% literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite.mtl.bin b/modules/BgfxRenderer/Shaders/compiled/fs_sprite.mtl.bin new file mode 100644 index 0000000000000000000000000000000000000000..a54cf7af417c2666b3fb6d717304686bc150c119 GIT binary patch literal 644 zcmZuu%TB{E5Om>YF7yu;aY<1XO2w^@3#j7KQ@KS^WD+-6a_q`>sz? zjSE<|C3|;gc4k+bm#e|&_ZPD35)E}`X!9hwR2x$5I90>J@i=h7F!o9tQ!CoXa9?-b zCcEqA0-;+ba$Xk{<`p%BXWA5;y)AM7uUS>xyDNTQVq9w`N)V)?dPi~!ZPg58ZB(5b zXgD!z!`Fm~Ox6Y;Fxa)_l9)$$E4NLyQlxw)hD;zya;GDjjM8+5KmG?{;v8e2wMDMF z)>K7Y=E4JYGq1b}S+r;0-OHFu>9w>eT~I7OHPI_!EZHw5 zT4Kj@EJftx`>x0lKwo+ z&h4mC^6bu;J+QS+SyRwAD@7ul(R(Sx^d9$v@pDJw*>_Wlfawk9K49(;`InVNUdF#h zP-9(8QrwC-?v$3UnQ2`%xEpoGCBmz!osxqbYJz7&%x%-cSy_boMA#vKPSoua~rq=eIa&WZUpXI4FAiq zSmxi7GCP==cBRY;rskEDdBDt2m(stkD(vwpC5JjU;>dZE!V~)(axWoIy%SBsjBr2N J@OFp#3qb$yU(g zh9_LCotuzFamLUw>7pZ0i;=9BrC|OYYJVm)g?!|p0T~Dcrl@y<8kj+;z!dgH@SlyK zftkQOvJvee=R`N`BV9V(Rdc*P-pW<@?nQNbkY_G<#|F{qRx-j|Z0IBSCy6~E%_ z*bk{oynmn}KlyhqDQKD}Oe_&Oa4tem*IivUDe{C$*K9Wf^x94OimJFX;HlyTpyyc2 zy5lOa1+BJPJMfC(7=`>)Ca!)V@LZylN{mPzkZnGk^$GLsI zdPAr=udh+y-$w(GinxIEIw-bKs6}57pm+ogEEEinpuq_0tLplunT*^1RcRxnhW@K< zfw8`js}$@uls+xcGwLcW=+RngsVpGl+GHmwy6SGlkip2#Hb<$nrOeU z`Q2u%>TZF4*b1KR_^D9e0bIe#HqWhH_;!Ik=g~1=g%mU^a$Yc3>9~qUfI$FEu!p?0 zb9VYWz>xpX9p-e6Dn=vU&}EHpSTw$2;a{=~b!_c+R$EbP^`D~Pa3H1Jm028dk?QtA zC8=U|+OdON&n3RHnk8LEm#d*nf^k-T1F1Ke riJZ>Nx@t2+#im;cP4Wl2V^IKen8zUu-8ggAT@C*E-=c0@pPj{DYWcrx literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite_glsl.bin.inc b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_glsl.bin.inc new file mode 100644 index 0000000..b69ca93 --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_glsl.bin.inc @@ -0,0 +1,20 @@ +unsigned char fs_sprite_glsl_bin[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, + 0x00, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, + 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, + 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, + 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, + 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, + 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, + 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00 +}; +unsigned int fs_sprite_glsl_bin_len = 204; diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin new file mode 100644 index 0000000000000000000000000000000000000000..3c5b198456e5a3e156c7dc975dd5973eefd76b59 GIT binary patch literal 386 zcmZut%TB{E5DeGlCsyK;UP2GtN_#>T9D3pyMbUUf&;zsq95jTp4a{>@?nvTF9y(oi+OnoZo{PyX!ov!v-J*!vivn zIy_OUabm3ig80}99xcgE?2Zg87X?m$se0>3Zg4;JN451d+>y`{>$-K;`Et2vniahK zFJkzo#ob1ItUF~8E%@z*MDU@sw=l bMCn%jinC5i)wjJ*l-CkHXK=~~keB`extf09 literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin.inc b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin.inc new file mode 100644 index 0000000..a6594e9 --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_mtl.bin.inc @@ -0,0 +1,57 @@ +unsigned char fs_sprite_mtl_bin[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x11, 0x01, 0xff, 0xff, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x02, 0x00, 0x00, 0x23, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, + 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a, 0x75, + 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, + 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, + 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, + 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, + 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, + 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, + 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, + 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, + 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, + 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, + 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, + 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, 0x78, + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, + 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, 0x76, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x20, 0x00 +}; +unsigned int fs_sprite_mtl_bin_len = 644; diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin new file mode 100644 index 0000000000000000000000000000000000000000..d863400ac581912dc18c4a6eed7a98e83ef7bb8f GIT binary patch literal 406 zcmYjMO$$L$6ddn)yiz_=?DQm-J_;$Zl1JJ30eXm(k3zDv_c#1M8w(p{=Azs>_netC z=gztP@gR1)-iI*f5&~?i5CuYr!A0#uBL#~L$VE){N8?fXaGaOxjjAMZ*hVQ$0#SsS z6`NqSRins|FiD+w8nCkAFh4ltkp0&?WHfV{%y#SD-gr3lRxw>J&XfK=SoVTrK*Hyw zv^j>3uyjA1=I$18-Z;Y48P*YU9wSS=%Pg!NJl=U`u4VZ47t2GO`W0sVSaa$N%TrvF fyUR~+>4^ye{vk; literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin.inc b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin.inc new file mode 100644 index 0000000..d8e59ec --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/fs_sprite_spirv.bin.inc @@ -0,0 +1,75 @@ +unsigned char fs_sprite_spirv_bin[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x00, 0x34, + 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, + 0x00, 0x08, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, + 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, + 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x07, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x51, 0x00, 0x00, 0x00, 0x76, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x05, 0x00, 0x55, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x12, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x22, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, + 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, + 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0d, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4d, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x61, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, + 0x00, 0x05, 0x00, 0x32, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x27, + 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x0d, + 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x56, + 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x86, + 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x3e, + 0x00, 0x03, 0x00, 0x62, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0xfd, + 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +unsigned int fs_sprite_spirv_bin_len = 863; diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite.glsl.bin b/modules/BgfxRenderer/Shaders/compiled/vs_sprite.glsl.bin new file mode 100644 index 0000000000000000000000000000000000000000..b48923f578521274f31fafd4e85878e58bc016f4 GIT binary patch literal 916 zcmZ`&%Wi`(5Oma>=uhksT8en)67}9=q)NRa7f9p^a0Cv4R6X@e`wRVouFcCy6AlPG zv$Hey`t9}Qp5U|i{{2}H;}AD2J8mlev0M(8YevGmAf|1 zfB=C#ubE)HynsSraY_ZfEE(6m8+`x9dblYI?n7mq8 zJ|o?X1Xpyrn>v97kJoklUPsNz;2_fSM9%4msxmGnaBc7$R|OckGNE*@2SS&__+Yi{ zJpQ$vs@>%=9+R3oSv#NY94}HteV137tCiZa@c@r!h_urqzSBxX8!Chf*1~j_-N_zz adSz?30YmluhcT5d$4fMY3z70=7~~JRTq2bK literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite.mtl.bin b/modules/BgfxRenderer/Shaders/compiled/vs_sprite.mtl.bin new file mode 100644 index 0000000000000000000000000000000000000000..f36e2ac4cad18e521b0e45b7fc182331f5999a9b GIT binary patch literal 1295 zcmaKs-D=w~6vrLt81r7@z+gBf)f~qeg)C)v+f7-Zu$y3n;wYJhECpL`os?be9e2N1 z*b8h&winr1I*~Y%^*hr4eC6}q$Cn z4>&ebGZR-axZ7v`H%C{JnOh@onNU=h2CZJyCa~IWD%uFzX`#%WIB-}l>p3lOkt8sO z@vL(TP_9hAUs(K8X?CTd_cYZ~=OJ2_1Z_hOMLv zT?iwzsA zBC(tL7Yc;-Kj}6iLL?*-dw#Ps>-I5vobx>A%=wzx_4;_a!Dz)+H$TTr{d{&Im|Dyf z!n=u>F$pXtQEN=Rs=G!`roq&jTe7fPO_dlUuG;P+qvNBgxo9#qc%~owJ`-oNwq_v~ z5odBi9{s80h2)jwjbvT&PV!N*At_4Y`blcvQlg|zSDsHQ@1kti^1WBQf>_j*n7Hqw6)RW83hI2s_gsPI9)E8tYb5X9}VrnhnQx;Qq z2@hCI4<$S(TyOgsp2|msB7Z&qME4s(smi?2{#hMn$h~|S|mDLk=R>!5YMihzJby-xx%&(&YGdnPE z0)OTP_VJh-m{);)-C=43GdJwj4)YG|+jMwCJ9ZZSMeShn?N=7^bSXOV(c7dEt5b4N z{`3jP25xqk{NPrHIe$R7M|-D)_`SlMJt;Bf;gH9D7Vp`|OL(YHGbi6w2^_*1V&0dq z+JzUiQwKG4s9xp|*C}R6JGH`{cbGeX!@lBl@Bc)YT8W20m^*^Q|GCrY6FZnY!|wgL zvr5dJRpRx(Fn5NX_#d=0JD(rS9l{YG%pHR9|KxP$gdJRT+*!?!KA8)PGuvYLF1R3; z9M2^52d1Z&68iD>*V5_7<2C8@GU(Eo1>;L5@H~%n8e$@O7}MEq`oVv zjyLj6vL<19?z{9g2{Amk={U}NZp(3%@qUP-R#u}jkYigyEWTCA=lP$GZ*sh^_m?p9 zL0Ft!RlW4NBf-vF^>yqzUR#-q>kz)2edKyg3c!>1f$o9YZV1CS>VE~eTDpGCfP}cz zj*rh(C!M$~&ow!Yb3RwI06gb?>=t2sh)o>oz%S!^yD6Rg_;H4Q+obE)p25yta@Rh0 zyEuGUo;&0?=!~N9{tgS^i;eFAz8fwn?~3*#;`prcS?7K689gcv{;_;Ge@r?t;C;Pa z(s?Vq4bPnr$GhMi`1|Y;$6X>U!E%461;8l@@i>n^b0lxCbUr)0_ltVDd`77SozEwB V^rCcP?I_wgBGx4JcelKT&2NpP*k}L% literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin new file mode 100644 index 0000000000000000000000000000000000000000..44771909a9fb822673b5258c4c9c09f27e75e7b7 GIT binary patch literal 2627 zcmb7FOK#gR5cOKU!~oeyiR;>;x-z;-&=1g}K~iK>6a*vDi3(XXD9V-_~SSn&9ux@4ufWlessUoNT!)QjtSM=H5xdS82{c@k*7F zhZoTNY-kAiED{T{5DW}aA0)Fdi_(E1>{5!KwV;LBz&NrN?I6cQ&&ylxJRWzbQO@HN z4#^8U@^!T;xN?2O@^zqj4W^V#Z%f4?&70ts$$gsNfhbiIyS-ag*Y_+DyYRxN1zT@2 zE~h|aA!HJm#&3BX(PEP^vzX1_P-fpZG$`~R!U0G}d_)EMxh*zcDeBM~YN;)N`L{L8G*{YBJ5VNT z$;PG*5JMtQk_JXKF)~DFb-dcBRWmI(WbdU|Ux{6z_W^!_xf`B^TZC>w0`I}IyFy8p z7r4KkKAuII;Gvu5zW!F24*_Qi z-nk26R_zg_!$r(8-bwtzUf7dMs3yLcRW2N3FcyU`g~DO1p<21XVs*^uW&(vTP0jYc z!m{w%oHhP@_I3*RhZ+WtRHk@>jHTDEXB8?tDSSAE7zLWZ9s`H?eIH-I*&#l*1$RPb zx*QVPdRoskD^@%A?B_{9Nt*<80q$#dkd{czEjfggY&NsY%~4tT12M1%Td3+ KqVXF&dXs<1$zJ9F literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin.inc b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin.inc new file mode 100644 index 0000000..13b5e55 --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_glsl.bin.inc @@ -0,0 +1,80 @@ +unsigned char vs_sprite_glsl_bin[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, + 0x03, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x31, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x34, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, + 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, + 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, + 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, + 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, + 0x32, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, + 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x28, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, + 0x32, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, + 0x20, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x78, 0x79, 0x20, 0x2d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, + 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, + 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, + 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x20, 0x2d, 0x20, 0x28, 0x74, 0x6d, + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, + 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, + 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, + 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x74, 0x6d, + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, + 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2e, 0x78, + 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x50, 0x6f, 0x73, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x30, 0x2e, 0x7a, 0x77, 0x29, 0x20, 0x2b, 0x20, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, + 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, + 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2e, 0x78, 0x20, 0x3d, + 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x77, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2e, 0x79, + 0x20, 0x3d, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x2e, 0x78, + 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, + 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x79, 0x7a, 0x2c, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2c, 0x20, 0x61, 0x5f, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x29, 0x3b, + 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, + 0x3d, 0x20, 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, + 0x2a, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x34, 0x29, 0x3b, 0x0a, + 0x7d, 0x0a, 0x0a, 0x00 +}; +unsigned int vs_sprite_glsl_bin_len = 916; diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin new file mode 100644 index 0000000000000000000000000000000000000000..4115bd9282d029a9a8fbc74ca0c6a996908986c2 GIT binary patch literal 1078 zcmaKq-D=w~6vq|TF{Zu5fx&P}s@Z84GP0E3ZM!H76m}DgP#h)GP^4f>snfD2*lXxDd^|Eq-`D$76eL)+mjJs9$5@xe%&kHot6ef_2 zTUmfhplw$glR3+0qGRfhdGKu;8^%u#nB znk>S(T+O|c(Mg(1q&7{KhD%P%QG6ks2qiaA|8Xcef-WD221n4af2Z}Yp1zKZ0?s!9C(;Qx1Lrz8s0U8cLEPs%Rwo? zlhF`=X10iwVf#@etn8jJBV4=$q0-XV^SjJn+(1il500*Wp*G7QL}(U{%e9hv10 tk7E}1AYpN<+W!c>Zn>8Ic@uoFA7L(?&rO&;%9~R1;yLM%zlU{A{sH8MU1|UT literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin.inc b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin.inc new file mode 100644 index 0000000..9296dbc --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_mtl.bin.inc @@ -0,0 +1,111 @@ +unsigned char vs_sprite_mtl_bin[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, + 0x04, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, + 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, + 0x62, 0x3e, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, + 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, + 0x3e, 0x0a, 0x0a, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, + 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, + 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, + 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, + 0x7b, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x67, 0x66, + 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x53, 0x69, 0x7a, 0x65, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x31, + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, + 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, + 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, + 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, + 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, + 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x31, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x32, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x34, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, + 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, + 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, + 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x34, 0x38, 0x20, + 0x3d, 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x35, 0x30, 0x20, + 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x28, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x32, 0x35, 0x33, + 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x20, 0x2d, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, + 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, + 0x66, 0x6d, 0x61, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x66, + 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x78, 0x2c, 0x20, 0x5f, + 0x32, 0x34, 0x38, 0x2c, 0x20, 0x2d, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, + 0x79, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x35, 0x30, 0x29, 0x29, 0x2c, 0x20, + 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x78, 0x2c, 0x20, + 0x5f, 0x32, 0x35, 0x30, 0x2c, 0x20, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x79, + 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x34, 0x38, 0x29, 0x29, 0x2c, 0x20, 0x69, + 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, 0x2e, 0x7a, 0x77, + 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, + 0x2e, 0x78, 0x79, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, + 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, + 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, + 0x6d, 0x69, 0x78, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x69, + 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x79, 0x7a, + 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x69, 0x6e, + 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x77, 0x2c, 0x20, + 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x2e, 0x78, + 0x29, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x07, 0x05, 0x00, 0x01, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00 +}; +unsigned int vs_sprite_mtl_bin_len = 1295; diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin new file mode 100644 index 0000000000000000000000000000000000000000..7fd7a1cc75a18db18481b223f674dc2529c8054c GIT binary patch literal 1757 zcmZXUOKVe66opS-t!-je#0LdSYKKaxl8PYO>Ld{gjf4tnC4{!ht!ZvZZX!+^K^!@$ z;7{mJ5D^i@fhaf-9f{9@Kfs9tCsNmUa!wlcgw?y(+K;o(+4uHhsgO2WoA-X4kD1|C zxgD(BEH=W`WXzZ(9upXiUtc%?=ZjhqcGVr5I@g_L-k6%}q9=<;mRi6#fyD z;9-5cOvc(&T&n~%$PFPB8bV807w!uWgoJ)6J%4J0l=|q;OKHE$@-5VYYhh#UTs2&x zl+><{y?qYy6J`-nE2SU7mGV+p4I8#kH2SEN>tQp9f>7PDCw&FwASyGR7u$ z+sChp(>wKuhcg2-;`u1BIX8YdGePt5%%q<)lYY)j;MCjDle_c#!I=>n_2A41enR&{ z-<*?$_Dc%i;AyGUs0#E8r^mWLf8O7eO@E%ZWz(PM9oh6ZuWHQVp+F8`(YN2zQJnK=Ce7P)uaJMvsMe%=+o=L^~BEU&$k zjYjTW*V`-E=75u~_l@j-_j>EJ{=MEwLnq(YelOeC zrVf1&S9E8?$^OKV!yG;cJ_m!lXEwf{k1j@!p7zOUTn@)~xvh D`y{n? literal 0 HcmV?d00001 diff --git a/modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin.inc b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin.inc new file mode 100644 index 0000000..ea7549f --- /dev/null +++ b/modules/BgfxRenderer/Shaders/compiled/vs_sprite_spirv.bin.inc @@ -0,0 +1,179 @@ +unsigned char vs_sprite_spirv_bin[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, + 0x00, 0x08, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, + 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x9c, + 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0xa8, + 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, + 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, + 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x99, 0x00, 0x00, 0x00, 0x61, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, + 0x00, 0x04, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x30, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa2, + 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x00, 0x05, + 0x00, 0x04, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x34, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x40, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x48, + 0x00, 0x04, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, + 0x00, 0x05, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x79, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x99, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa2, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, + 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, + 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, + 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x11, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x28, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0x2c, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x2b, + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x76, 0x00, 0x00, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x78, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x78, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x94, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x98, + 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x9f, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x94, + 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xba, + 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc1, + 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, + 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x96, + 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x11, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9c, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0xa8, + 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0xea, + 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, + 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9d, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf2, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xee, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0xfa, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xee, + 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x07, + 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xff, + 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0xfd, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0xfa, + 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x58, + 0x01, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, + 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x58, + 0x01, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x09, + 0x01, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0xfd, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x09, + 0x01, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x50, + 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x59, 0x01, 0x00, 0x00, 0x06, + 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, + 0x00, 0x00, 0x00, 0x59, 0x01, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0xea, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, + 0x01, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x01, 0x00, 0x00, 0x16, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0x1a, 0x01, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x19, + 0x01, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x41, + 0x00, 0x05, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x76, + 0x00, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x90, + 0x00, 0x05, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1d, 0x01, 0x00, 0x00, 0x1a, + 0x01, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x21, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf2, + 0x00, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x24, + 0x01, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x4f, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00, 0x9a, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x33, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x21, + 0x01, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00, 0x85, + 0x00, 0x05, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x96, + 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, + 0x00, 0x00, 0x00, 0x1d, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x33, 0x01, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, + 0x00, 0x01, 0x00, 0x00, 0x07, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00 +}; +unsigned int vs_sprite_spirv_bin_len = 2109; diff --git a/modules/BgfxRenderer/Shaders/fs_sprite.bin.h b/modules/BgfxRenderer/Shaders/fs_sprite.bin.h new file mode 100644 index 0000000..a7ba024 --- /dev/null +++ b/modules/BgfxRenderer/Shaders/fs_sprite.bin.h @@ -0,0 +1,157 @@ +// Auto-generated shader bytecode - sprite fragment shader with texture support +// Supports: SPIRV (Vulkan), GLSL (OpenGL), Metal + +static const uint8_t fs_sprite_spv[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x00, 0x34, + 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, + 0x00, 0x08, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, + 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, + 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x07, 0x00, 0x26, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x51, 0x00, 0x00, 0x00, 0x76, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x05, 0x00, 0x55, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x12, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x22, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x26, + 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x51, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, + 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0d, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x25, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4d, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x61, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, + 0x00, 0x05, 0x00, 0x32, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x27, + 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x0d, + 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x56, + 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x86, + 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x3e, + 0x00, 0x03, 0x00, 0x62, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0xfd, + 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +static const unsigned int fs_sprite_spv_len = sizeof(fs_sprite_spv); + +static const uint8_t fs_sprite_glsl[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, + 0x00, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, + 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, + 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, + 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, + 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, + 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, + 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00 +}; +static const unsigned int fs_sprite_glsl_len = sizeof(fs_sprite_glsl); + +static const uint8_t fs_sprite_mtl[] = { + 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x11, 0x01, 0xff, 0xff, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x11, 0x01, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x73, + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x02, 0x00, 0x00, 0x23, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, + 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a, 0x75, + 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, + 0x67, 0x66, 0x78, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, + 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, + 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, + 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, + 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, + 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, + 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, + 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, + 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, + 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, + 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x62, 0x67, 0x66, 0x78, + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x30, 0x20, 0x3d, + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, + 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, 0x76, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x00, 0x20, 0x00 +}; +static const unsigned int fs_sprite_mtl_len = sizeof(fs_sprite_mtl); diff --git a/modules/BgfxRenderer/Shaders/fs_sprite.sc b/modules/BgfxRenderer/Shaders/fs_sprite.sc new file mode 100644 index 0000000..c771c8b --- /dev/null +++ b/modules/BgfxRenderer/Shaders/fs_sprite.sc @@ -0,0 +1,12 @@ +$input v_color0, v_texcoord0 + +#include + +SAMPLER2D(s_texColor, 0); + +void main() +{ + // Sample texture and multiply by vertex/instance color + vec4 texColor = texture2D(s_texColor, v_texcoord0); + gl_FragColor = texColor * v_color0; +} diff --git a/modules/BgfxRenderer/Shaders/varying.def.sc b/modules/BgfxRenderer/Shaders/varying.def.sc index 699eef3..53bda2c 100644 --- a/modules/BgfxRenderer/Shaders/varying.def.sc +++ b/modules/BgfxRenderer/Shaders/varying.def.sc @@ -1,8 +1,10 @@ -// Varying definitions for bgfx shaders - -vec4 v_color0 : COLOR0 = vec4(1.0, 1.0, 1.0, 1.0); +vec4 v_color0 : COLOR0 = vec4(1.0, 1.0, 1.0, 1.0); vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; +vec3 a_position : POSITION; +vec4 a_color0 : COLOR0; +vec4 i_data0 : TEXCOORD7; +vec4 i_data1 : TEXCOORD6; +vec4 i_data2 : TEXCOORD5; +vec4 i_data3 : TEXCOORD4; +vec4 i_data4 : TEXCOORD3; diff --git a/modules/BgfxRenderer/Shaders/vs_sprite.bin.h b/modules/BgfxRenderer/Shaders/vs_sprite.bin.h new file mode 100644 index 0000000..4d17c8d --- /dev/null +++ b/modules/BgfxRenderer/Shaders/vs_sprite.bin.h @@ -0,0 +1,375 @@ +// Auto-generated shader bytecode - sprite vertex shader with texture support +// Supports: SPIRV (Vulkan), GLSL (OpenGL), Metal + +static const uint8_t vs_sprite_spv[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x08, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, + 0x00, 0x08, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, + 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x9c, + 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0xa8, + 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, + 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, + 0x00, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x99, 0x00, 0x00, 0x00, 0x61, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, + 0x00, 0x04, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x30, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa2, + 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x00, 0x05, + 0x00, 0x04, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x34, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x40, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x48, + 0x00, 0x04, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, + 0x00, 0x05, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x79, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x99, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa2, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x0b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x00, 0x04, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, + 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, + 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, + 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x11, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x28, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0x2c, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x2b, + 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x76, 0x00, 0x00, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x77, + 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x78, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x78, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x94, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x98, + 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0x9f, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x94, + 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0x94, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xba, + 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, + 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc1, + 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, + 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x96, + 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x11, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9c, + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x3d, + 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0xa8, + 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0xea, + 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, + 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x9d, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf2, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xee, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0xfa, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xee, + 0x00, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x07, + 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0xff, + 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0xfd, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0xfa, + 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x58, + 0x01, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, + 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x58, + 0x01, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x09, + 0x01, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0xfd, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x09, + 0x01, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x50, + 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x59, 0x01, 0x00, 0x00, 0x06, + 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, + 0x00, 0x00, 0x00, 0x59, 0x01, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0xea, + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, + 0x01, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x01, 0x00, 0x00, 0x16, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0x1a, 0x01, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x19, + 0x01, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x41, + 0x00, 0x05, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x76, + 0x00, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x90, + 0x00, 0x05, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1d, 0x01, 0x00, 0x00, 0x1a, + 0x01, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x21, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf2, + 0x00, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x24, + 0x01, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x4f, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00, 0x9a, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x33, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x21, + 0x01, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00, 0x85, + 0x00, 0x05, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x96, + 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, + 0x00, 0x00, 0x00, 0x1d, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, + 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, + 0x00, 0x00, 0x00, 0x33, 0x01, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, + 0x00, 0x01, 0x00, 0x00, 0x07, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00 +}; +static const unsigned int vs_sprite_spv_len = sizeof(vs_sprite_spv); + +static const uint8_t vs_sprite_glsl[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, + 0x03, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x31, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x34, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, + 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, + 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, + 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, + 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, + 0x32, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, + 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x28, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, + 0x32, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, + 0x20, 0x28, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x78, 0x79, 0x20, 0x2d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, + 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, + 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, + 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x20, 0x2d, 0x20, 0x28, 0x74, 0x6d, + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x5f, + 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, + 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, + 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x74, 0x6d, + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, + 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2e, 0x78, + 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x50, 0x6f, 0x73, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x30, 0x2e, 0x7a, 0x77, 0x29, 0x20, 0x2b, 0x20, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, + 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, + 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, + 0x5f, 0x35, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2e, 0x78, 0x20, 0x3d, + 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x77, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2e, 0x79, + 0x20, 0x3d, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x2e, 0x78, + 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, + 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x79, 0x7a, 0x2c, 0x20, 0x74, + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x2c, 0x20, 0x61, 0x5f, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x29, 0x3b, + 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, + 0x3d, 0x20, 0x28, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, + 0x2a, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x34, 0x29, 0x3b, 0x0a, + 0x7d, 0x0a, 0x0a, 0x00 +}; +static const unsigned int vs_sprite_glsl_len = sizeof(vs_sprite_glsl); + +static const uint8_t vs_sprite_mtl[] = { + 0x56, 0x53, 0x48, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0xf2, 0xe1, + 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, + 0x04, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, + 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, + 0x62, 0x3e, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, + 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, + 0x3e, 0x0a, 0x0a, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, + 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, + 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, + 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, + 0x7b, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x67, 0x66, + 0x78, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x53, 0x69, 0x7a, 0x65, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x31, + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, + 0x20, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, + 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, + 0x6e, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, + 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, + 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, + 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x31, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x32, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x34, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, + 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, + 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, + 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, + 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x34, 0x38, 0x20, + 0x3d, 0x20, 0x63, 0x6f, 0x73, 0x28, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x35, 0x30, 0x20, + 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x28, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x31, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x32, 0x35, 0x33, + 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x20, 0x2d, 0x20, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, + 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, + 0x66, 0x6d, 0x61, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x66, + 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x78, 0x2c, 0x20, 0x5f, + 0x32, 0x34, 0x38, 0x2c, 0x20, 0x2d, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, + 0x79, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x35, 0x30, 0x29, 0x29, 0x2c, 0x20, + 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x78, 0x2c, 0x20, + 0x5f, 0x32, 0x35, 0x30, 0x2c, 0x20, 0x5f, 0x32, 0x35, 0x33, 0x2e, 0x79, + 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x34, 0x38, 0x29, 0x29, 0x2c, 0x20, 0x69, + 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, 0x2e, 0x7a, 0x77, + 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x30, + 0x2e, 0x78, 0x79, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, + 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, + 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x2a, 0x20, 0x69, 0x6e, 0x2e, 0x69, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x6f, 0x75, 0x74, 0x2e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x76, 0x5f, + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, + 0x6d, 0x69, 0x78, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x69, + 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x79, 0x7a, + 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x69, 0x6e, + 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x31, 0x2e, 0x77, 0x2c, 0x20, + 0x69, 0x6e, 0x2e, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x32, 0x2e, 0x78, + 0x29, 0x2c, 0x20, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x07, 0x05, 0x00, 0x01, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00 +}; +static const unsigned int vs_sprite_mtl_len = sizeof(vs_sprite_mtl); diff --git a/modules/BgfxRenderer/Shaders/vs_sprite.sc b/modules/BgfxRenderer/Shaders/vs_sprite.sc new file mode 100644 index 0000000..f8891ce --- /dev/null +++ b/modules/BgfxRenderer/Shaders/vs_sprite.sc @@ -0,0 +1,45 @@ +$input a_position, a_color0, i_data0, i_data1, i_data2, i_data3, i_data4 +$output v_color0, v_texcoord0 + +#include + +// Instanced sprite shader with texture support +// Instance data layout (5 x vec4 = 80 bytes): +// i_data0: x, y, scaleX, scaleY +// i_data1: rotation, u0, v0, u1 +// i_data2: v1, textureId, layer, padding +// i_data3: reserved +// i_data4: r, g, b, a (color) + +void main() +{ + // Extract transform from instance data + vec2 pos = i_data0.xy; + vec2 scale = i_data0.zw; + float rot = i_data1.x; + + // Extract UVs from instance data + float u0 = i_data1.y; + float v0 = i_data1.z; + float u1 = i_data1.w; + float v1 = i_data2.x; + + float c = cos(rot); + float s = sin(rot); + + // Transform vertex (quad is 0-1, center at 0.5) + vec2 localPos = a_position.xy - vec2(0.5, 0.5); + vec2 rotatedPos; + rotatedPos.x = localPos.x * c - localPos.y * s; + rotatedPos.y = localPos.x * s + localPos.y * c; + vec2 worldPos = rotatedPos * scale + pos; + + gl_Position = mul(u_viewProj, vec4(worldPos, 0.0, 1.0)); + + // Interpolate UVs based on vertex position in quad (0-1) + // a_position.xy is the vertex position (0,0), (1,0), (1,1), (0,1) + v_texcoord0 = mix(vec2(u0, v0), vec2(u1, v1), a_position.xy); + + // Color = vertex color * instance color + v_color0 = a_color0 * i_data4; +} diff --git a/tests/integration/test_20_bgfx_rhi.cpp b/tests/integration/test_20_bgfx_rhi.cpp index 9c7007f..f6d4c2b 100644 --- a/tests/integration/test_20_bgfx_rhi.cpp +++ b/tests/integration/test_20_bgfx_rhi.cpp @@ -389,14 +389,20 @@ void test_sprite_instance_struct() { sprite.v0 = 0.0f; sprite.u1 = 1.0f; sprite.v1 = 1.0f; - sprite.color = 0xFFFFFFFF; - sprite.textureId = 5; - sprite.layer = 10; + sprite.textureId = 5.0f; + sprite.layer = 10.0f; + sprite.padding0 = 0.0f; + sprite.reserved[0] = sprite.reserved[1] = sprite.reserved[2] = sprite.reserved[3] = 0.0f; + sprite.r = 1.0f; + sprite.g = 1.0f; + sprite.b = 1.0f; + sprite.a = 1.0f; ASSERT(sprite.x == 50.0f); ASSERT(sprite.scaleX == 2.0f); - ASSERT(sprite.textureId == 5); - ASSERT(sprite.layer == 10); + ASSERT(sprite.textureId == 5.0f); + ASSERT(sprite.layer == 10.0f); + ASSERT(sizeof(SpriteInstance) == 80); // Must be 80 bytes for GPU } // ============================================================================