Rustracer - PBR glTF 2.0 Renderer

Rustracer is a PBR glTF 2.0 renderer based on Vulkan ray-tracing, written in Rust.

Project Introduction

Rustracer is designed to load and render complex 3D models using the glTF 2.0 format. It supports a wide range of features, including PBR material support, animations, and various glTF extensions. The project builds on existing Vulkan ray-tracing examples and integrates several advanced rendering techniques to provide high-quality visuals.

Features

  • Loading glTF 2.0 Models

    • Full node hierarchy
    • Mesh support with normal mapping, two sets of texture coordinates, and Mikktspace tangent generation
    • Alpha blending and testing
    • Full PBR material support with both metallic-roughness and specular-glossiness workflows
    • Articulated animations and skinning using compute shaders
    • Support for various glTF extensions such as KHR_materials_ior and KHR_materials_transmission
  • Optimizations

    • Rayon-accelerated texture loading
    • Async model loading
  • Realtime Ray Tracing

    • Future plans include rasterization mode, G-buffer, hybrid mode, SVGF denoiser, and better multi-light sampling
  • Extras

    • Open file by drag-and-drop
    • Skybox support

Demos

Lucy in Cornell Lucy in Cornell

Building

Prerequisites

  • Linux with a graphics card that supports KHR ray tracing
  • External C libraries such as the Vulkan SDK

Build Command

  1. Install Nix package manager (Linux only) and direnv.
  2. cd into the project directory and direnv allow.
  3. Alternatively, install the necessary libraries manually.
  4. Run the build command:
cargo run

Assets

Pointers to glTF models:

Credits

This project builds on work from:

References

For more information and to contribute to the project, visit the Rustracer repository on GitHub.

Similar Projects