Open
Description
Implement Mesh Shading
Objective
Refactor our current rendering pipeline to use mesh shaders, replacing the traditional vertex-fragment pipeline for improved performance and flexibility in geometry processing.
Tasks
1. Update Vulkan Initialization
- Enable Vulkan 1.2 or later
- Add mesh shader feature requirements
2. Shader Development
- Create a new mesh shader to replace vertex shader functionality
- Modify existing fragment shader to work with mesh shader outputs
- (Optional) Implement a task shader for pre-processing and culling
3. Pipeline Creation
- Update
PipelineGenerator
to support mesh shader pipelines - Remove vertex input state and input assembly state from pipeline creation
- Add mesh shader stage to pipeline
4. Mesh Data Handling
- Implement Shader Storage Buffer Objects (SSBOs) for mesh data
- Create a buffer for positions, normals, texture coordinates, etc.
- Update C++ code to fill and bind these buffers
5. Draw Call Updates
- Replace traditional draw calls with
vkCmdDrawMeshTasksEXT
- Implement logic to calculate appropriate group counts (X, Y, Z)
Definition of Done
- Mesh shader pipeline is fully implemented and integrated into the engine
- All existing models render correctly using the new pipeline
- Performance meets or exceeds the traditional pipeline in benchmark tests
- Code is well-documented and follows our style guidelines
- Pull request is reviewed and approved by at least one other team member