-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99689ce
commit d02728c
Showing
6 changed files
with
192 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# vku | ||
|
||
![Linux](https://github.com/stripe2933/vku/actions/workflows/linux.yml/badge.svg) | ||
![Windows](https://github.com/stripe2933/vku/actions/workflows/windows.yml/badge.svg) | ||
|
||
A set of Vulkan utilities based on RAII idiom and Modern C++ features. | ||
|
||
## Features | ||
|
||
- Based on C++20 module and (optionally) C++23 standard library module: just single line `import vku;` will cover all. | ||
- Can be easily integrated to your existing project by vcpkg. | ||
- RAII handle for buffer and image with Vulkan Memory Allocator (VMA), with rich set of information. | ||
- Bootstrapping for physical device, device and VMA allocator generation with fully customizable configurations and compile time safety. | ||
- Automatic physical device selection based on queue family and extension requirements. | ||
- Show accepted/rejected physical devices with your requirements. | ||
- Templated descriptor set layout, automatic descriptor write inferring and pool size estimation. | ||
- Managing multiple attachment image and views with MSAA and `VK_KHR_dynamic_rendering` support. | ||
- Combining runtime shader compilation, shader loading and pipeline creation to single function. | ||
- Executing hierarchical commands across the multiple queues with best-efficient way using `VK_KHR_timeline_semaphore`, by runtime dependency graph solver. | ||
- Forwarding your Vulkan code logics by "inlining" the structure initialization. | ||
- Useful utility functions including debugging support. | ||
- And more... | ||
|
||
## Projects that uses vku | ||
|
||
I wrote several Vulkan projects using *vku*. | ||
|
||
| Project | Description | | ||
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| ![Vulkan glTF Viewer screenshot](docs/images/showcase/vk-gltf-viewer.png)<br>[Vulkan glTF Viewer](https://github.com/stripe2933/vk-gltf-viewer) (Currently no README) | Blazingly fast Vulkan glTF renderer.<br><ul><li>Fully bindless (descriptor set only updated in the model loading time), vertex pulling based, and GPU driven indirect rendering. **All scene nodes can be rendered with up to 8 draw calls** regardless of their material properties and complexity.</li><li>PBR (physical based rendering) + IBL (image based lighting), support **asynchronous runtime spherical harmonics and prefiltered map generation using only compute shader**.</li><li>Can render opaque, alpha tested (using Alpha to Coverage) and translucent (using Weighted Blended OIT) materials.</li><li>**Directly memcpy the glTF buffer memory into GPU using multi-thread, dedicated transfer queue without pre-processing**, makes faster resource loading time.</li><li>Unlimited texture coordinate indices count (can render a primitive that has arbitrary `TEXCOORD_<i>`) using buffer device address approach.</li><li>Pixel-perfect mouse picking, outline rendering and transformation gizmo for scene nodes.</li><li>Can mainpulate the node visibility based on hierarchy.</li></ul> | | ||
| ![vk-deferred screenshot](https://github.com/stripe2933/vk-deferred/blob/main/doc/images/running-screenshot.png?raw=true)<br>[vk-deferred](https://github.com/stripe2933/vk-deferred) | Application that demonstrates the deferred rendering demonstration with 1500 lights. It uses `vku::AttachmentGroup` to efficiently manage multiple attachment images' properties (transiency and memorylessness) in the deferred render pass to reduce the GPU bandwidth in tile-based rendering GPU. | | ||
| ![vk-weighted-blended screenshot](https://github.com/stripe2933/vk-weighted-blended/blob/main/doc/images/running-screenshot.png?raw=true)<br>[vk-weighted-blended](https://github.com/stripe2933/vk-weighted-blended) | Application that demonstrates the weighted blended OIT demonstration. It uses `vku::AttachmentGroup` to efficiently manage multiple attachment images' properties (transiency and memorylessness) in the deferred render pass to reduce the GPU bandwidth in tile-based rendering GPU. | | ||
|
||
## Getting Started | ||
|
||
### Build Steps | ||
|
||
*vku* can be used with CMake `find_package`, `FetchContent`, `CPM.cmake` or vcpkg (using overlay ports). See [Using vku](docs/using-vku.md) for details. | ||
|
||
> [!NOTE] | ||
> *vku* can only be used with overlay ports when using vcpkg for now. I'm currently planning for make *vku* to be available with vcpkg official ports. | ||
### Tutorials | ||
|
||
For library users' best understanding, I wrote step-by-step tutorials for building some Vulkan applications using *vku*. For each step, it first shows how Vulkan-Hpp (with RAII binding) does, then which portion of the code can be simplified with *vku*. I really recommend you to read them. | ||
|
||
| Tutorial | Description | | ||
|:-------------------------------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| ![Tutorial 1](docs/images/hello-triangle/final.png)<br>[Hello Triangle](docs/hello-triangle.md) | It demonstrates the most simplest Vulkan application with graphics operation, rendering a colored triangle onto image, and additionally persist the image into the file.<br><br>You'll learn: <br><ul><li>Boostrapping physical device, device and VMA allocator creation with `vku::Gpu<QueueFamilies, Queues>`.</li><li>Creating RAII buffer (`vku::MappedBuffer`) and image (`vku::AllocatedImage`).</li><li>Creating graphics pipeline with *vku* way.</li><li>Executing a single command with *vku*.</li></ul> | | ||
| ![Tutorial 2](docs/images/hello-triangle-window/final.png)<br>Hello Triangle Window (In Progress) | It renders the triangle in a resizable GLFW window.<br><br>You'll learn: <ul><li>Customizing `vku::Gpu` queue family selection configuration.</li><li>Use `vku::AttachmentGroup` to manage multiple swapchain images into single object.</li><li>Structuring your Vulkan project into separated single-responsibility classes.</li><li>Implementing Frames in flight.</li></ul> | | ||
| ![Tutorial 3](docs/images/rotating-box/final.png)<br>Rotating Box (In Progress) | It renders a textured rotating box with 4x MSAA.<br><br>You'll learn: <ul><li>Use `vku::MsaaAttachmentGroup` to manage the whole color/depth/swapchain images at once.</li><li>Creating typed descriptor set layout with `vku::DescriptorSet`.</li><li>Estimating the required descriptor pool size from descriptor sets automatically by `vku::PoolSize`.</li><li>Infer the required descriptor writes using `vku::DescriptorSet<DescriptorSetLayout>`.</li></ul> | | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details. |
Oops, something went wrong.