{"id":13621929,"url":"https://github.com/zeux/niagara","last_synced_at":"2025-04-12T22:17:21.727Z","repository":{"id":40414515,"uuid":"141769473","full_name":"zeux/niagara","owner":"zeux","description":"A Vulkan renderer written from scratch on stream","archived":false,"fork":false,"pushed_at":"2025-04-11T23:03:18.000Z","size":1285,"stargazers_count":1474,"open_issues_count":0,"forks_count":84,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-12T22:17:13.459Z","etag":null,"topics":["vulkan"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-21T00:41:29.000Z","updated_at":"2025-04-11T23:03:21.000Z","dependencies_parsed_at":"2024-07-09T23:44:11.243Z","dependency_job_id":"cba3f3ae-9576-42a1-af62-4770ae06c5ed","html_url":"https://github.com/zeux/niagara","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeux%2Fniagara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeux%2Fniagara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeux%2Fniagara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeux%2Fniagara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeux","download_url":"https://codeload.github.com/zeux/niagara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637786,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vulkan"],"created_at":"2024-08-01T21:01:12.126Z","updated_at":"2025-04-12T22:17:21.721Z","avatar_url":"https://github.com/zeux.png","language":"C++","readme":"# Niagara\n\nThis is a Vulkan renderer that is written on stream from scratch - without using any third party code that is Vulkan specific. We are using non-Vulkan-specific third party libraries however.\n\nThe goal is to experiment with a few modern Vulkan rendering techniques, such as GPU culling \u0026 scene submission, cone culling, automatic occlusion culling, task/mesh shading, and whatever else it is that we will want to experiment with.\nThe code will be written on stream.\n\n![image](https://github.com/user-attachments/assets/b102622e-fbe7-4e9c-b575-e4d4533eadfe)\n\n# Requirements\n\nThe renderer was originally written using Visual Studio and targeted Windows desktops with modern Vulkan drivers. Since then the development platform has switched to Linux, but you can still build and run it on Windows - via CMake.\n\n# Building\n\nTo build and run the project, clone this repository using --recursive flag:\n\n\tgit clone https://github.com/zeux/niagara --recursive\n\nMake sure you have Vulkan 1.4 SDK and drivers installed; open the folder niagara in Visual Studio (as a CMake project) and build it. On Linux, you can use CMake with your build generator of choice.\n\nTo run the program, command line should contain arguments with paths to .obj files or a .gltf scene; you can use kitten.obj from data/ folder for testing.\n\nTo use Amazon Lumberyard Bistro scene, clone https://github.com/zeux/niagara_bistro and specify path to bistro.gltf instead.\n\n# Stream\n\nThe development of this project is streamed on YouTube, on Saturdays at 11 AM PST with a somewhat irregular schedule.\n\nPlaylist: https://www.youtube.com/playlist?list=PL0JVLUVCkk-l7CWCn3-cdftR0oajugYvd\n\n1. Setting up instance/device and filling the screen with a solid color: https://youtu.be/BR2my8OE1Sc\n2. Rendering a triangle on screen: https://youtu.be/5eS3gsL_P-c\n3. Cleaning up validation errors and implementing swapchain resize: https://youtu.be/_VU-G5rglnA\n4. Rendering a mesh using shader storage buffers and int8: https://youtu.be/nKCzD5iK71M\n5. Rendering a mesh using NVidia RTX mesh shading pipeline: https://youtu.be/gbeOKMjmQ-g\n6. Optimizing GPU time by using device-local memory and parallelizing mesh shader: https://youtu.be/ayKoqK3kQ9c\n7. Using descriptor update templates and parsing SPIRV to extract reflection data: https://youtu.be/3Py4GlWAicY\n8. Cluster cone culling using task shaders and subgroup ops: https://youtu.be/KckRq7Rm3Mw\n9. Tuning mesh shading pipeline for performance: https://youtu.be/snZkA4D_qjU\n10. Depth buffer, perspective projection, 3D transforms and multi draw indirect: https://youtu.be/y4WOsAaXLh0\n11. Multiple meshes and GPU frustum culling: https://youtu.be/NGGzk4Fi2iU\n12. Draw call compaction using KHR_draw_indirect_count and LOD support: https://youtu.be/IYRgDcnJJ2I\n13. Depth pyramid construction and extending SPIRV reflection parser: https://youtu.be/YCteLdYdZWQ\n14. Automatic occlusion culling: https://youtu.be/Fj1E1A4CPCM\n15. Vulkan 1.2 and GPU buffer pointers: https://youtu.be/78tVIA6nRQg\n16. Upgrading to Vulkan 1.3: https://youtu.be/Ka30T6BMdhI\n17. Implementing triangle culling: https://youtu.be/JKTfAgv3Vlo\n18. Meshlet occlusion culling: https://youtu.be/5sBpo5wKmEM\n19. Optimizing culling: https://youtu.be/1Tj6bZvZMts\n20. Task command submission: https://youtu.be/eYvGruGHhUE\n21. Cluster compute culling: https://youtu.be/zROUBE5pLuI\n22. Loading glTF scenes: https://youtu.be/9OF6k57orXo\n23. Bindless textures: https://youtu.be/n9nqSEyXMeA\n24. Tracing rays: https://youtu.be/N1OVfBEcyb8\n25. Tracing rays faster: https://youtu.be/U7TGQsjT16E\n26. Materials and shadows: https://youtu.be/iZTUjRntMbM\n27. Transparent shadows: https://youtu.be/233jxF7irmE\n28. Moving objects: https://youtu.be/TcuUz1ib35c\n\n# Issues\n\nDuring the streams we find various bugs in parts of the Vulkan stack and report them; bugs marked with ✔️ have been fixed.\n\n* ✔️ vkAcquireNextImageKHR crashes in validation layers if vkGetSwapchainImagesKHR hasn't been called \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/358\n\n* ✔️ vkGetPhysicalDeviceSurfaceFormatsKHR doesn't fill format count correctly \\\nhttps://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/797666\n\n* ✔️ Fix NonWritable check when vertexPipelineStoresAndAtomics not enabled \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/73\n\n* ✔️ Implicit int8-\u003efloat cast adds Int8 capability to the shader without asking for GL_KHX_shader_explicit_arithmetic_types \\\nhttps://github.com/KhronosGroup/glslang/issues/1525\n\n* ⁉ vkCreateSwapchainKHR crashes in Intel drivers when display is plugged into a dedicated GPU \\\nhttps://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/797756\n\n* ✔️ Reading uint8_t from storage buffers adds (unnecessarily) UniformAndStorageBuffer8BitAccess capability \\\nhttps://github.com/KhronosGroup/glslang/issues/1539\n\n* ✔️ Binding a buffer with VK_BUFFER_USAGE_VERTEX_BUFFER_BIT as a storage buffer using push descriptors doesn't produce validation errors \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/413\n\n* ✔️ Fragment shader with perprimitiveNV doesn't have OpExtension SPV_NV_mesh_shader \\\nhttps://github.com/KhronosGroup/glslang/issues/1541\n\n* ✔️ GL_NV_mesh_shader spec typo for per-primitive fragment shader inputs \\\nhttps://github.com/KhronosGroup/GLSL/issues/31\n\n* ✔️ Push descriptors generate false positive DescriptorSetNotBound errors \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/341\n\n* ✔️ vkCmdDrawIndexedIndirect doesn't issue an error when the buffer wasn't created with VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/450\n\n* ✔️ vkCmdDrawMeshTasksIndirectNV doesn't trigger an error when multiDrawIndirect feature is disabled \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/451\n\n* ✔️ vkCmdDrawIndexedIndirect is rendering fewer than drawCount draw calls on Intel \\\nReproduce using https://github.com/zeux/niagara/commit/fda3d8743c933fb3a533fed560a6671402d6693b\n\n* ✔️ vkCmdDrawIndexedIndirectCountKHR is causing a GPU crash on Intel \\\nReproduce using https://github.com/zeux/niagara/commit/c22c2c56d06249835a474e370ea3218463721f42\n\n* ✔️ Crash during Vulkan replay in push descriptor replay \\\nhttps://github.com/baldurk/renderdoc/issues/1182\n\n* ✔️ NVidia GTX 10xx series GPUs cause VK_ERROR_DEVICE_LOST when drawCount is 1'000'000 \\\nReproduce using https://github.com/zeux/niagara/commit/8d69552aede9c429765c8c8afd6687d3f3e53475\n\n* ✔️ AMD drivers 18.11.2 on Windows don't handle specialization constants correctly \\\nUsing specialization constant LATE in drawcull.comp.glsl leads to no objects being rendered on screen after the first frame\n\n* ✔️ During validation of pipelines with SPIRV 1.4/1.5 and specialization constants, optimizer isn't configured to use Vulkan 1.2 \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1512\n\n* ✔️ Crash when calling vkCmdDrawIndexedIndirectCount loaded through GIPA \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1513\n\n* ✔️ SHADER_MODULE_STATE::has_specialization_constants is not initialized \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1530\n\n* ✔️ Missing validation: push descriptor updates don't trigger image layout mismatch errors \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1862\n\n* ✔️ A valid interface block in mesh/task shader is considered invalid \\\nhttps://github.com/KhronosGroup/SPIRV-Tools/issues/3653\n\n* ✔️ Usage of any fields of gl_MeshPrimitivesEXT is enabling capability FragmentShadingRateKHR even if gl_PrimitiveShadingRateEXT is not used \\\nhttps://github.com/KhronosGroup/glslang/issues/3103\n\n* ✔️ Incomplete mip data is encoded for non-power-of-two textures \\\nhttps://github.com/wolfpld/etcpak/pull/43\n\n* radv should use pointer flags on RDNA3 during BVH traversal \\\nhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417\n\n* radv: VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR is not supported for TLAS \\\nhttps://gitlab.freedesktop.org/mesa/mesa/-/issues/12346\n\n* ✔️ Missing synchronization validation for ray tracing acceleration updates \u0026 uses \\\nhttps://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/9076\n\n* ✔️ anv: Mesh shaders with two OpSetMeshOutputsEXT instructions are not supported \\\nhttps://gitlab.freedesktop.org/mesa/mesa/-/issues/12388\n","funding_links":[],"categories":["Graphics","C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeux%2Fniagara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeux%2Fniagara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeux%2Fniagara/lists"}