![]() |
Lysa
0.0
Lysa 3D Engine
|
Lysa supports Microsoft Windows, Linux (X11 & Wayland) and macOS (KosmicKrisp) and requires the following dependencies:
slangc must be on PATH or in the Vulkan SDK bin directory)For Linux, the following additional packages are also required:
vulkan-validation-layerslibc++setup-env.sh from the Vulkan installation directory to set the VULKAN_SDK environment variable.For macos (Apple Silicon only) :
Lysa Engine is intended to be used as a Git submodule or a CMake subdirectory of your project.
Create a .env.cmake file at the root of your project to point to the Vireo RHI source. Optionally configure the NVIDIA PhysX paths if you use that backend:
The engine's CMakeLists.txt will look for .env.cmake at CMAKE_CURRENT_SOURCE_DIR automatically if VIREO_RHI_PROJECT_DIR is not already defined.
Set the desired feature flags before calling add_subdirectory, then link against lysa_engine:
PHYSIC_ENGINE_JOLT and PHYSIC_ENGINE_PHYSX are mutually exclusive.| Option | Standalone default | Description |
|---|---|---|
DIRECTX_BACKEND | ON | DirectX 12 backend (Windows only) |
FORWARD_RENDERER | ON | Include the forward rendering path |
DEFERRED_RENDERER | ON | Include the deferred rendering path |
PHYSIC_ENGINE_JOLT | ON | Jolt Physics backend (fetched automatically via FetchContent) |
PHYSIC_ENGINE_PHYSX | OFF | NVIDIA PhysX backend (requires PHYSX_INCLUDE and PHYSX_LIBRARIES in .env.cmake) |
LUA_BINDINGS | OFF | Lua scripting with LuaBridge bindings |
LYSA_CONSOLE | OFF | Console-only build (no window or input system) |
USE_SDL3 | ON (Linux) | SDL3 windowing (Linux only) |
Automatically fetched dependencies (no manual installation required):
PHYSIC_ENGINE_JOLT is ON)LUA_BINDINGS is ON)The engine provides the platform-specific main() / WinMain() for you. Your code must define lysaMain() instead:
On Windows the engine calls lysaMain() from WinMain(). On Linux and macos it calls it from main().
Application shaders are written in Slang and compiled to both DXIL (DirectX 12) and SPIR-V (Vulkan) at build time using the add_shaders() and compile_slang_shaders() CMake helpers provided by cmake/shaders.cmake:
Compiled .dxil and .spv binaries are written to the output directory. The engine loads them at runtime by name (without extension) through the VFS app://shaders/ path.
Shader naming conventions used by the build system:
| File suffix | Profile | Entry point |
|---|---|---|
.vert.slang | vs_6_6 | vertexMain |
.frag.slang | ps_6_6 | fragmentMain |
.comp.slang | cs_6_6 | main |
All public interfaces use C++23 module files (.ixx) paired with .cpp implementations. Import the top-level lysa module to get the full engine API:
When adding a new subsystem to your own project, follow the same pattern and use the build_target() CMake helper from cmake/compile_options.cmake to register a new library target with the correct compiler settings: