Skip to content

joshnies/sicilia

Repository files navigation

Sicilia

A simple Vulkan PBR renderer written in Odin.

⚠️ Originally designed with the intention of expanding into a lightweight game engine for Linux, but I've since abandoned work on this due to time constraints. My hope is this can be a reference for others seeking to build their own engine or renderer.

Features:

  • Physically-based 3D renderer built on Vulkan
  • gLTF 2.0 support
  • Cubemap convolution and BRDF LUT computation via Vulkan compute shaders
  • Asset preprocessor (package and standalone application)
  • DDS/BCn texture compression on NVIDIA GPUs using NVTT 3

Prerequisites

Name Version
odin (nightly)
Vulkan SDK 1.3+
glfw 3.4+
just
python 3.13+
uv

Fedora

When building on Fedora, make sure you've installed the following:

sudo dnf install glfw \
    glfw-devel \
    libcxx-devel \
    libcxxabi-devel \
    mesa-libGL-devel

Setup

git submodule update --init
just build-imgui
make -C "$(dirname $(which odin))/vendor/stb/src"

Running

just build  # build all binaries (release)
just run    # run engine (release)
just debug  # run engine (debug)

Configuration

Sicilia relies on Odin's compile-time configuration.

Variable Type Description
DEBUG_STATS bool Enable/disable debug engine metrics.
DESCRIPTOR_POOL_MAX int Maximum number of pools that can be allocated from a dynamic descriptor allocator.
DESCRIPTOR_POOL_SIZE_MAX int Maximum number of vk.DescriptorPoolSize definitions that can be stored for each pool in a dynamic descriptor allocator.
EDITOR bool Enable/disable editor mode.
FRAMES_IN_FLIGHT int Maximum overlap in frames that can be rendered before displaying a new image.
LIGHTS_PER_PIXEL int Maximum number of lights that can effect a single fragment (pixel).
MSAA_SAMPLES int MSAA sample count between 1 and 16.
MSAA_SHADING float Fractional minimum for MSAA sample shading between 0 and 100.
WINDOW_WIDTH int Default window width in pixels. Minimum: 200
WINDOW_HEIGHT int Default window height in pixels. Minimum: 200

Example:

odin run . -define:DEBUG_STATS=true -define:MSAA_SAMPLES=1

Structure

Package Description
assets Internal assets required by the engine.
cache Processed file caching.
dda Dynamic Descriptor Allocator.
demo Optional demo assets.
engine Main engine source.
preprocessor Asset preprocessor.
shaders GLSL and SPIR-V shaders.
vendor Third-party libraries.

About

A simple Vulkan PBR renderer written in Odin.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published