Renderer Resource Manager Rewrite: From Vulkan to NVRHI // Hazel Engine Stream (25.06.2025)
https://www.youtube.com/watc...Context*
- Coldest day of the year in Melbourne at 7°C (very important note)
- Shows current Hazel state: red clear color working through new renderer
- Scene renderer successfully running clear passes, but main rendering disabled
- Goal: Get 2D rendering working first as stepping stone to 3D
*06:00 Resource Management Deep Dive*
- Core Problem: Need to bridge shader resources (textures, buffers) with render passes
- Resource Frequency Concept: Different update frequencies for different resource types:
- Per-object: Material textures (most frequent)
- Per-render-pass: Camera uniforms (medium frequency)
- Static: BRDF lookup tables (least frequent)
- Descriptor Set Strategy: Using sets 0-3 for different frequency levels
- Explains why render passes take inputs rather than individual draw calls handling everything
*30:00 Descriptor Set Manager Rewrite*
- Major Refactor: Converting from Vulkan-specific VkDescriptorSet to NVRHI binding sets
- Data Structure Changes:
- Replacing VK write descriptors with NVRHI binding set descriptions
- Converting vector storage to static arrays for better memory layout
- Moving from descriptor pools to direct binding set creation
- Validation System: Maintains shader-driven validation where shaders define required inputs
- Dynamic Resource Handling: System for resources that can change (frame buffers, resizable buffers)
*1:20:00 Shader Reflection System*
- Input Declaration Creation: Moving shader resource declarations from old system to new NVRHI-based approach
- Type Mapping: Converting between shader types (uniform buffers, textures, storage buffers) and NVRHI binding types
- Render Input Types: Establishing consistent type system across different graphics APIs
- Validation Logic: Ensuring render passes have all required inputs before rendering
*1:50:00 Architecture Cleanup*
- Class Hierarchy Simplification: Removing Vulkan-specific subclasses (VulkanRenderPass, VulkanComputePass)
- API Abstraction: Moving toward single render pass and compute pass classes that work with any backend
- Code Organization: Relocating platform-specific code to appropriate locations
*2:20:00 Debugging Session*
- Build and Test: First compilation and runtime testing of new system
- Resource Validation Working: Camera uniform buffer successfully being validated
- Binding Set Creation: System creating NVRHI binding sets from render pass specifications
- Shader Dimension Issues: Debugging problems with texture dimension detection (1D vs 2D vs Cube)
- Sampler Separation: Encountering issues with HLSL's separate texture/sampler model vs Vulkan's combined approach
Home
/
Indie Game Developers/
Cherno Unplugged/
Renderer Resource Manager Rewrite: From Vulkan to NVRHI // Hazel Engine Stream (25.06.2025)