Project Info

Welcome to LiteFX ✨ - A modern, flexible computer graphics and rendering engine, written in C++20 with support for Vulkan 🌋 and DirectX 12 ❎. It contains an abstraction layer over both back-ends, that allows for seamless switching between them, without re-creating the target surface. The engine can be configured through a fluent builder interface, making it possible to easily and quickly express render pipeline configurations. It uses CMake and vcpkg to resolve dependencies and supports custom shader targets (written in HLSL or GLSL), allowing you to setup a basic, fully featured rendering application within seconds.

Interested? You can start right now by heading over to the documentation and read the project setup 🔨 and quick start 🚀 guides. The source code is available on GitHub 🐱‍🚀.

Fluent Interface

The explicit nature of modern graphics APIs can be pretty obtrusive. LiteFX offers a fluent builder interface that helps you to quickly configure commonly used objects in a domain language. Here is an example:

SharedPtr<InputAssembler> inputAssembler = device->buildInputAssembler()
    .vertexBuffer(sizeof(Vertex), 0)
        .withAttribute(0, BufferFormat::XYZ32F, 
            offsetof(Vertex, Position), AttributeSemantic::Position)
        .withAttribute(1, BufferFormat::XYZW32F,
            offsetof(Vertex, Color), AttributeSemantic::Color)

UniquePtr<RenderPass> renderPass = device->
    buildRenderPass("Render Pass")
        Format::B8G8R8A8_UNORM, { 0.0f, 0.0f, 0.0f, 1.f })

UniquePtr<RenderPipeline> renderPipeline = 
    device->buildRenderPipeline(*renderPass, "Render Pipeline")

Render Backends

The core of LiteFX is a flexible computer graphics engine with support for modern graphics APIs. It is implemented for two backends: DirectX 12 ❎ and Vulkan 🌋. Though currently not officially implemented, it is also possible to write custom backends for older graphics APIs and still benefit from a possible performance improvements, since the abstraction layer follows principles that are also used by Approaching Zero Driver Overhead (AZDO).

CMake Integration

LiteFX already uses CMake for building. On top of that, it also exports the helpers it internally already uses to build its samples, so you can also use them in your application to automate building shaders or integrate assets into your build process. The CMake library allows you to define shader module targets and link them to your application just as you would with normal library targets. Shader modules can be written in HLSL and GLSL and can be compiled using DXC and GLSLC. Furthermore, it allows you to define a directory hierarchy for static assets.

ADD_SHADER_MODULE(MyVertexShader SOURCE "vs.hlsl" 

    NAME "textures"
    ASSETS "assets/texture.tga"

Open Source

The engine only depends on open source software and is open source itself. Feel free to create your own fork, open a pull request or report an issue. Get started by heading over to GitHub 🐱‍🚀.