This video details the ongoing development of a new renderer (Renderer 2025) for the Hazel Engine, a project aimed at abstracting graphics API backends. The creator, Cherno, focuses on integrating NVIDIA's NVRHI library, which provides a unified interface for Vulkan, DirectX11, and DirectX12. The stream showcases a live coding session where Cherno refactors core rendering classes like IndexBuffer, VertexBuffer, Pipeline, Image, Texture, and FrameBuffer, systematically porting them from their Vulkan-specific implementations to utilize NVRHI. Key challenges identified include managing low-level resource states (like clear/load operations for framebuffers) and the upcoming complete rewrite of the ImGUI renderer. The ultimate goal is to make the Hazel Engine more robust, cross-platform, and eventually release a free, binary version.
Working on New Renderer // Hazel Engine Stream (12.05.2025)
0:00 - 1:00 Returning to Stream & Renderer 2025: Cherno welcomes viewers back to his live stream, marking his return after six months. He introduces the main topic: working on the "Renderer 2025" project, part of the Hazel Engine roadmap towards a free release.
1:00 - 3:00 Adopting NVRHI for Backend Abstraction: The new renderer will integrate NVIDIA's NVRHI library to abstract Vulkan, DirectX11, and DirectX12, offloading the burden of multi-API backend implementation from Hazel. Cherno notes he hasn't extensively used NVRHI outside of this project.
3:00 - 7:00 New Rendering Architecture: Cherno illustrates the updated rendering architecture: Hazel's rendering API will now interface directly with NVRHI, which then handles the specific graphics APIs. This change allows for the removal of Hazel's internal Vulkan renderer.
7:00 - 12:00 Shader Language & Console Ambitions: He discusses the potential shift from GLSL to HLSL for easier cross-API shader compilation. Cherno also mentions future plans for console support, particularly Nintendo Switch, due to its Vulkan compatibility.
12:00 - 19:00 Initial Build & Error Management: Starting the live coding, Cherno attempts a full build, encountering over 1600 errors. He demonstrates his debugging strategy: disabling problematic features (like GLSL live compilation) and compiling individual files to manage the error list.
19:00 - 36:00 Refactoring Core Buffers & Pipelines: Cherno begins porting IndexBuffer and VertexBuffer classes, addressing issues with private constructors and Hazel's custom reference counting. He successfully moves the Pipeline implementation to its base class, deleting the old Vulkan-specific code.
36:00 - 59:00 Updating Image & Texture Classes: The focus shifts to porting Image and Texture classes, replacing Vulkan-specific structures (like VKImage and VulkanImageView) with NVRHI equivalents (e.g., TextureSubResourceSet).
59:00 - 1:15:00 Deleting Old Vulkan Image/Texture Code: Cherno continues the deep refactoring of Image and Texture classes, highlighting the goal of removing all Vulkan-specific implementation details. He successfully deletes the VulkanImage.h and .cpp files.
1:15:00 - 1:47:00 Tackling FrameBuffer Complexity: The FrameBuffer class proves to be one of the most challenging due to its intricate, state-driven nature. Cherno grapples with NVRHI's handling of loadOp and storeOp (clear/load operations), which appear to be automatically set to "load" by NVRHI, conflicting with Hazel's explicit clear logic.
1:47:00 - 1:57:00 Continued FrameBuffer Porting & Swap Chain: He continues working on the FrameBuffer, integrating NVRHIFrameBufferDescription for depth and color attachments. Acknowledges the complexity of handling swap chain targeting, which allows a framebuffer to directly target the screen.
1:57:00 - 2:00:00 Significant Error Reduction: After substantial refactoring, a full build shows the error count drastically reduced to 36, indicating good progress. Cherno then deletes the VulkanTexture.h and .cpp files.
2:00:00 - 2:05:00 Sampler Integration & NVRHI Benefits: Cherno integrates sampler creation into the NVRHI structure, noting NVRHI's unified approach to handling sampler settings, which simplifies the process compared to older OpenGL designs.
2:05:00 - 2:10:00 Hazel's Development & Game Jam History: He briefly discusses Hazel's status, mentioning various game jam games created with the engine (available on studiocherno.io) and the plan for a free, binary release by the end of the year.
2:10:00 - 2:15:00 Engine Identity & Cube Maps: Cherno describes Hazel as having "its own unique flavor," distinguishing it from engines like Unity despite C# scripting similarities. He then starts porting TextureCube (cube map) functionality.
2:15:00 - 2:32:00 Finalizing Texture & Image Refactoring: Cherno completes the major refactoring for Texture and Image classes, cleaning up remaining Vulkan-specific code. He points out remaining to-do items like mipmap generation and data copying.
2:32:00 - 2:40:00 Last Vulkan Texture Deletion & ImGUI Renderer: The last of the VulkanTexture files are deleted. Cherno highlights the next significant challenge: rewriting the VulkanImGui renderer to work with NVRHI, as it's currently tightly coupled to Vulkan.
2:40:00 - 2:50:00 ImGUI Rewrite & Debugging Considerations: He reiterates the necessity of rewriting the ImGUI renderer for NVRHI. Cherno also briefly touches on how NVRHI will handle debug message callbacks.
2:50:00 - 3:00:00 Compute Pipeline & Resource Binding: Cherno begins to examine the VulkanComputePipeline and ComputePass classes. He identifies that Hazel's descriptor set management will require a significant rewrite to align with NVRHI's binding sets and binding layouts for resource management.
3:00:00 - 3:10:00 Stream Wrap-up & Future Content: Cherno expresses his tiredness and plans to conclude the stream. He informs viewers about his upcoming streaming schedule (Wednesday morning, next Monday evening) and teases future content, including a video where he plans to try coding in Rust for the first time.