A toy renderer written in C using Vulkan to perform real-time ray tracing research.

This is a toy renderer written in C using Vulkan. It is intentionally minimalist. It has been developed and used for the papers "BRDF Importance Sampling for Polygonal Lights" and "BRDF Importance Sampling for Linear Lights." Correspondingly, there are two branches. For more information see: https://momentsingraphics.de/ToyRendererOverview.html

Downloading Data

Scenes and other data that are needed to run the renderer are available on the websites for the papers: http://momentsingraphics.de/Siggraph2021.html http://momentsingraphics.de/HPG2021.html

Building the Renderer

The renderer is written in C99 with few dependencies. Imgui and GLFW are specified as submodules, so you should be able to clone them alongside this repository (use git clone --recurse-submodules). You also need the latest Vulkan SDK (version 1.2.176.1 or later) available here: https://vulkan.lunarg.com/sdk/home

On Linux the Vulkan SDK should be available via your package manager. Validation layers are needed for a debug build but not for a release build. You may have to use beta drivers, depending on what your package repositories provide otherwise. https://developer.nvidia.com/vulkan-driver

Vulkan on macOS is notoriously problematic but it may work with the latest SDK.

Once all dependencies are available, use CMake to create project files and build.

Running the Renderer

Get data files first (see above). Run the binary with current working directory vulkan_renderer.

Ray tracing uses the extension VK_KHR_ray_query. The latest NVIDIA drivers for Windows support it: https://www.nvidia.com/download/index.aspx

To use ray tracing, you will also need a GPU that supports it. That includes all GPUs with RTX in the name. Pascal or Turing GPUs do not support the required extensions. AMD GPUs of the Radeon RX 6000 series should also work but have not been tested.

You can run the application without ray tracing but your driver has to support Vulkan 1.2. If the demo does not start, take a look at its command line output.

Important Code Files

The GLSL implementation of our techniques is found in: src/shaders/polygon_sampling.glsl src/shaders/line_sampling.glsl (on the corresponding branch)

The complete shading pass, including our multiple importance sampling, is part of: src/shaders/shading_pass.frag.glsl

Licenses

Most code in this package is licensed under the terms of the GPLv3. However, you have the option to use the core of the sampling methods in polygon_sampling.glsl and line_sampling.glsl under the BSD license. See the comments at the top of each file for details.

Owner
Christoph Peters
This profile accompanies the blog http://MomentsInGraphics.de/ by Christoph Peters. It is mostly about computer graphics research and practice.
Christoph Peters
Similar Resources

physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

Features Classical Deferred Renderer Physically Based shading Image Based Lighting BRDF Disney model (Burley + GGX) Tangent space normal mapping Reinh

Jun 2, 2022

A dx12 river renderer using wave particles with interactive vortices.

A dx12 river renderer using wave particles with interactive vortices.

Wave Particles with Interactive Vortices Final Result Overview In game industry water can be divided into two domains, ocean and river. This project f

Jun 16, 2022

Minimal pathtracer using Vulkan RayTracing

Minimal pathtracer using Vulkan RayTracing

Single File Vulkan Pathtracing Minimal pathtracer using Vulkan RayTracing Environment Vulkan SDK 1.2.162.0 GPU / Driver that support Vulkan Ray Tracin

May 8, 2022

vkQuake is a Quake 1 port using Vulkan instead of OpenGL for rendering

Vulkan Quake port based on QuakeSpasm

Jun 16, 2022

simple fdtd using vulkan, omp or single thread

simple fdtd using vulkan, omp or single thread

fdtd simple fdtd using vulkan, omp or single thread example how to build first clone the repo with: git clone https://github.com/nikisalli/fdtd.git up

Feb 14, 2022

Modern C++14 library for the development of real-time graphical applications

CI Community Support bs::framework is a C++ library that aims to provide a unified foundation for the development of real-time graphical applications,

Jun 10, 2022

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities

Jun 18, 2022

A minimalist library with basic facilities for developing interactive real-time 3D applications, with a strong emphasis on simplicity and ease of use.

A minimalist library with basic facilities for developing interactive real-time 3D applications, with a strong emphasis on simplicity and ease of use.

SlimEngine A minimalist and platform-agnostic base project for interactive graphical applications (2D/3D) with a strong emphasis on simplicity, ease o

May 10, 2022

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Jun 22, 2022
Source Code for "Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs" by Eric Haines and Tomas Akenine-Möller

Apress Source Code This repository accompanies Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs by Eric Haines and Tomas

Jun 15, 2022
This repository accompanies Ray Tracing Gems II: Next Generation Rendering with DXR, Vulkan, and OptiX
This repository accompanies Ray Tracing Gems II: Next Generation Rendering with DXR, Vulkan, and OptiX

Apress Source Code This repository accompanies Ray Tracing Gems II: Next Generation Rendering with DXR, Vulkan, and OptiX by Adam Marrs, Peter Shirley

Jun 21, 2022
A real-time DirectX 11 renderer. The renderer is named by my girlfriend's english name.
A real-time DirectX 11 renderer. The renderer is named by my girlfriend's english name.

sophia Sophia is a real-time DirectX 11 renderer. It is not quite a rich graphics engine, only packages some low-level DirectX functions and contains

Dec 11, 2021
My implementations of Ray Tracing in One Weekend written in many different languages.

Ray Tracing in Many Languages This repository contains my implementation of the Ray Tracing in One Weekend book written in several different programmi

Oct 19, 2021
A path tracer based on hardware ray tracing

GoldenSun GoldenSun is a GPU path tracer. It uses hardware ray tracing APIs to do the tracing. As an experimental project, there is no release plan, n

Feb 27, 2022
Implementation of light baking system for ray tracing based on Activision's UberBake

Vulkan Light Bakery MSU Graphics Group Student's Diploma Project Treefonov Andrey [GitHub] [LinkedIn] EARLY STAGES OF DEVELOPMENT Project Goal The goa

May 24, 2022
ReferencePT - Supplemental code accompanying Ray Tracing Gems II, Chapter 14: The Reference Path Tracer
ReferencePT - Supplemental code accompanying Ray Tracing Gems II, Chapter 14: The Reference Path Tracer

The Reference Path Tracer Code sample This is a supplemental code accompanying Ray Tracing Gems II, Chapter 14: The Reference Path Tracer. Code is bas

May 30, 2022
Getting Started with RTX Ray Tracing

Getting Started with RTX Ray Tracing This directory contains Chris Wyman's shader tutorials from the GDC 2019 and SIGGRAPH 2018 courses "Introduction

Jun 14, 2022
Overlay Microsoft Flight Simulator (FS2020) aircraft data onto real airport charts in real-time
Overlay Microsoft Flight Simulator (FS2020) aircraft data onto real airport charts in real-time

FLIGHTSIM CHARTS Introduction Overlay Microsoft Flight Simulator (FS2020) aircraft data onto real airport charts in real-time. Instantly teleport to a

May 31, 2022
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup

A minimalist and platform-agnostic interactive/real-time raytracer. Strong emphasis on simplicity, ease of use and almost no setup to get started with

May 18, 2022