What problem does it solve?
It solves the problem of defining renderable GPU entities that reliably compile the right pipeline, bind the right resources, and dispatch draw calls without cache corruption or WGPU validation errors.
Core Features & Use Cases
- Auto-renderability via super-traits: Implement
ShaderHashProvider, GraphicsShaderProvider, and ShaderPassBuilder to get an auto-implemented RenderComponent render path.
- Deterministic pipeline caching: Use
hash_type_info and a correctness-focused hash_pipeline to ensure pipeline cache keys match shader generation and fixed-function state.
- Onion/middleware composition: Use
RenderSlice-style forward (setup_pass) and reverse (post_setup_pass) ordering to compose effects cleanly.
- Binding contract safety: Ensure
setup_pass/post_setup_pass binding declarations exactly match build/post_build binding order and types.
Quick Start
Implement the three super-traits for your component type, make hash_pipeline cover every shader-generation and fixed-function pipeline input, then use your type as a render component in a pass so it binds resources and dispatches draws correctly.