- Implement texture memory budget tracking to prevent GPU memory exhaustion.
- Add validation for texture dimensions against GPU capabilities before loading.
- Introduce checks for memory budget before texture allocation.
- Validate the success of bgfx::copy() during texture loading.
- Improve error handling and logging for texture creation failures.
- Ensure proper cleanup of texture memory during pipeline destruction.
- Add comprehensive unit tests for initialization order, texture loading, and resource management.
- Document potential issues in LoadTextureFromFile and shader compilation processes.
- Updated MeshPayload structure to include tangents.
- Modified BuildPayloadFromBspBuffer to compute tangents based on vertex normals.
- Enhanced AppendMeshPayload to handle tangents, either from mesh data or generated.
- Updated PushMeshToLua to expose tangents to Lua.
- Adjusted ReadVertexArray to read tangents from Lua.
feat(shader): implement ShaderPipelineValidator for shader validation
- Added ShaderPipelineValidator class to validate shader inputs/outputs and vertex layouts.
- Implemented methods to extract shader attributes and validate against vertex layouts.
- Added comprehensive validation checks for shader pipelines, including SPIR-V requirements.
- Created a logger interface for validation results.
test(shader): add unit tests for ShaderPipelineValidator
- Implemented extensive unit tests for shader validation, covering various scenarios.
- Tests include extraction of shader inputs/outputs, validation of vertex layout matches, stride checks, and interface matching.
- Added edge case tests for empty shaders and comments in GLSL code.
- Introduced string_view class for non-owning string references.
- Added traits header for type traits and utility functions.
- Implemented unordered_map class for hash table based key-value storage.
- Created unordered_set class for hash table based unique key storage.
- Developed vector class for dynamic array functionality with various utility methods.
- Implemented `compilePSSLShader` function in `shaderc_pssl.cpp` to handle PSSL shader compilation, currently returning an unsupported message.
- Introduced `shaderc_spirv.cpp` with comprehensive SPIR-V shader compilation logic, including GLSL to SPIR-V translation, reflection, and uniform handling.
- Added necessary includes and defined resource limits for SPIR-V compilation.
- Established texture format mappings and attribute enumerations for shader inputs.
- Enhanced error handling and logging for shader compilation processes.
- Introduced a new vertex shader for texture cube rendering in `vs_texture_cube.sc`.
- Enabled debugging for shader validation in the graphics backend initialization.
- Refactored GUI shaders to use a structured output for vertex data, improving clarity and maintainability.
- Updated shader compiler to disable automatic uniform binding, allowing for explicit binding in shaders.
- Simplified shader binary wrapping by removing unnecessary uniform and attribute metadata embedding, leveraging bgfx's reflection capabilities.
refactor(bgfx_gui_service): Integrate BgfxShaderCompiler for shader creation and validation
test(bgfx_gui_service): Enhance tests to validate shader key presence and uniform initialization
- Deleted the shader_variants.lua script, which contained functions for building shader parameter overrides and shader variants.
- Updated ShaderScriptService to remove Lua integration for shader path loading, now relying solely on MaterialX configuration.
- Simplified logging and error handling in shader path loading, ensuring clarity in the absence of shader variants.
- Added support for triangle mesh rigid bodies in the physics bridge service.
- Implemented methods to create static meshes and retrieve linear velocities in the script engine service.
- Introduced new Lua bindings for physics operations, including `physics_create_static_mesh` and `physics_get_linear_velocity`.
- Improved shader creation in the graphics backend with auto-bind uniform options and error handling.
- Refactored shader generation to consolidate output and input declarations into structured blocks.
- Enhanced GUI service with better resource logging and error handling.
- Added utility functions for transforming points using matrices.
- Added SetGravity method to adjust the gravity in the physics world.
- Introduced AddSphereRigidBody method for creating sphere rigid bodies.
- Implemented RemoveRigidBody method to delete existing rigid bodies.
- Added SetRigidBodyTransform method to update the position and rotation of rigid bodies.
- Included ApplyForce and ApplyImpulse methods for applying forces and impulses to rigid bodies.
- Added SetLinearVelocity method to set the linear velocity of rigid bodies.
- Enhanced StepSimulation method to accept a maxSubSteps parameter.
- Implemented GetBodyCount method to retrieve the number of rigid bodies in the world.
- Added Clear method to remove all rigid bodies from the physics world.
- Updated the script engine service to bind new physics methods to Lua.
- Enhanced material configuration handling in shader script service.
- Introduced MaterialXMaterialConfig structure for better material management.
- Added texture binding support in ShaderPaths structure.
- Included stb_image implementation for image loading support.
- Introduced IPlatformService interface with methods for retrieving platform information, current video driver, and available video/render drivers.
- Implemented PlatformService to gather and log detailed system information, including CPU capabilities, environment variables, and SDL video driver support.
- Updated BgfxGraphicsBackend to utilize IPlatformService for platform-specific data.
- Enhanced SdlWindowService to log system information upon window creation.
- Added utility functions for string formatting and feature value retrieval.