| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
LightweightVK is a deeply refactored bindless-only fork of IGL which is designed to run on top of Vulkan 1.3 with optional mesh shaders and ray tracing support.
Meta's version is a fork of the upstream LightweightVK, tailored for better compatibility with current and upcoming Meta products.
The main goals of LightweightVK:
Designed for rapid prototyping of modern Vulkan-based renderers.
There are no plans to keep this fork in sync with the IGL upstream, since the API was completely redesigned in a bindless manner.
Discord: https://discord.com/invite/bEyHyKCrvq
| Windows | Linux | MacOS | Android | |
|---|---|---|---|---|
| Vulkan 1.3 | ✔️ | ✔️ | ✔️ | ✔️ |
| VK_KHR_acceleration_structure | ✔️ | ✔️ | ✔️ | |
| VK_KHR_ray_tracing_pipeline | ✔️ | ✔️ | ✔️ | |
| VK_KHR_ray_query | ✔️ | ✔️ | ✔️ | |
| VK_EXT_mesh_shader | ✔️ | ✔️ | ✔️ | |
| OpenXR 1.1 | ✔️ |
On MacOS, KosmicKrisp and VulkanSDK 1.4.363+ are required.
Before building, run the deployment scripts:
python3 deploy_content.py python3 deploy_deps.py
These scripts download external third-party dependencies. Please check LICENSE.md for the full list.
cd build cmake .. -G "Visual Studio 18 2026"
sudo apt-get install clang xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols cd build cmake .. -G "Unix Makefiles"
❗ Use cmake .. -G "Unix Makefiles" -DLVK_WITH_WAYLAND=ON to build for Wayland, X11 is used by default.
❗ Be sure that VulkanSDK 1.4.363+ for MacOS is installed https://vulkan.lunarg.com/sdk/home#mac
cd build cmake .. -G "Xcode"
❗ Be sure that Android Studio is set up.
❗ Be sure that the ANDROID_NDK environment variable points to your Android NDK.
❗ Be sure that the JAVA_HOME environment variable is set to the path of the Java Runtime.
❗ Be sure that the adb platform tool is in the PATH environment variable.
cd build cmake .. -DLVK_WITH_SAMPLES_ANDROID=ON cd android/001_HelloTriangle # or any other sample ./gradlew assembleDebug # or assembleRelease
You can also open the project in Android Studio and build it from there.
Before running demo apps on your device, connect the device to a desktop machine and run the deployment script:
python3 deploy_content_android.py
NOTE: To run demos on an Android device, it should support Vulkan 1.3. Please check https://vulkan.gpuinfo.org/listdevices.php?platform=android
NOTE: At the moment, demo apps do not support touch input on Android.
By default, the Slang compiler is disabled, and only GLSL shaders are supported through the glslang compiler. To enable Slang, configure the project with the following CMake option:
cmake .. -DLVK_WITH_SLANG=ON
Check out https://github.com/corporateshark/lightweightvk/samples.
A comprehensive set of examples can be found in this repository 3D Graphics Rendering Cookbook: 2nd edition and in the book Vulkan 3D Graphics Rendering Cookbook - 2nd Edition.
The header file lvk/vulkan/VulkanUtils.h offers a collection of functions that allow you to access the underlying Vulkan API objects from LightweightVK handles. This makes it easy to mix LVK and Vulkan code, as shown in the following example:
lvk::Holder<lvk::BufferHandle> vertexBuffer = ctx_->createBuffer({...});
...
lvk::ICommandBuffer& buffer = ctx_->acquireCommandBuffer();
VkCommandBuffer cmdBuf = getVkCommandBuffer(buffer);
VkBuffer buf = getVkBuffer(vertexBuffer);
vkCmdUpdateBuffer(cmdBuf, buf, 0, sizeof(params), ¶ms);
ctx_->submit(buffer, ctx_->getCurrentSwapchainTexture());If you'd like to add more helper functions, feel free to submit a pull request.
LightweightVK is released under the MIT license, see LICENSE.md for the full text as well as third-party library acknowledgements.
| Back | FazBrowse Home | New Git URL |