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

Related tags

Graphics referencePT
Overview

The Reference Path Tracer Code sample

This is a supplemental code accompanying Ray Tracing Gems II, Chapter 14: The Reference Path Tracer. Code is based on IntroToDXR and implements a path tracer described in the article. The sample application loads GLTF scenes, specified via command line. The core of the path tracer can be found in single HLSL file - PathTracer.hlsl.

"Reference Path Tracer

Command Line Arguments

  • -width [integer] specifies the width (in pixels) of the rendering window
  • -height [integer] specifies the height (in pixels) of the rendering window
  • -vsync [0|1] specifies whether vsync is enabled or disabled
  • -scene [path] specifies the file path to a GLTF model
  • -scenePath [path] optionally specifies the root folder where scene data files can be found

Licenses and Open Source Software

The code uses the following dependencies:

The repository includes assets for use when testing the renderer: Bathroom, by cenobi, licensed under a Creative Commons Attribution 3.0 License.

You might also like...
Brute force volumetric path tracer written in C++
Brute force volumetric path tracer written in C++

volpt Brute force volumetric path tracer written in C++. WIP. Features Homogeneous medium Hero wavelength sampling for chromatic absorption/scattering

A realtime Vulkan voxel path tracer.
A realtime Vulkan voxel path tracer.

brickmap-vulkan A realtime Vulkan voxel path tracer. This is a work in progress! This system is a Vulkan/SPIRV implementation of the BrickMap by stijn

SVG animation from multiple SVGs or single GIF using tracer
SVG animation from multiple SVGs or single GIF using tracer

svgasm svgasm is a proof-of-concept SVG assembler to generate a self-contained animated SVG file from multiple still SVG files with CSS keyframes anim

Direct3D 12.0 quick reference guide

Direct3D 12.0 quick reference guide

Pathway is an Android library that provides new functionalities around the graphics Path API.

Pathway is an Android library that provides new functionalities around the graphics Path API.

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++

DirectX Tool Kit for DirectX 11 http://go.microsoft.com/fwlink/?LinkId=248929 Copyright (c) Microsoft Corporation. All rights reserved. January 9, 202

ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.

pbrt, Version 3 This repository holds the source code to the version of pbrt that is described in the third edition of Physically Based Rendering: Fro

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

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

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

📘 CHAPTER-6 📘 10 days of C++. Learn the basics of C++. Other topics will be covered in chapter-7

CPP-BOOK CHAPTER - 6: 10 days of C++. Learn the basics of C++. Other topics will be covered in the next chapter(premium) /* Multi-line Comment */ // S

Upgraded from Pixar postcard path tracing, instead of printing Pixar, this program print my name, which pose to be more challenging than the original code. The upgraded is also more readable and run 9x faster than the original source code. ✔️The smallest header-only GUI library(4 KLOC) for all platforms
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

Supplemental source code for "A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision".

This repository provides source code to reproduce some of the results of my paper "A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision". The key contribution of this paper is to provide super simple algorithms to compute Catmull-Clark subdivision in parallel with support for semi-sharp creases. The algorithms are compiled in the C header-only library CatmullClark.h. In addition you will find a direct GLSL port of these algorithms in the glsl/ folder. For various usage examples, see the examples/ folder.

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

Physically-based GPU and CPU ray-tracer emerging on a surface
Physically-based GPU and CPU ray-tracer emerging on a surface

etx-tracer Physically-based GPU and CPU ray-tracer emerging on a surface. Features Vertex Connection and Merging algorithm (CPU and GPU); Full-spectra

3D ray-tracing and animation engine for pixel matrices.
3D ray-tracing and animation engine for pixel matrices.

ProtoTracer: Protogen Ray-Tracing and Animation Engine This project is a 3D ray-tracing and animation engine for pixel matrices, designed to be used f

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 Sampl

Comments
  • If the d3d device doesn't support raytracing, the program will crash with an access violation instead of showing an alert

    If the d3d device doesn't support raytracing, the program will crash with an access violation instead of showing an alert

    The check if the d3d.device is nullptr or not is done inside the for loop in CreateDevice. If it's placed after the iteration of adapters, the check will be carried out if there is not device with raytracing support.

    https://github.com/boksajak/referencePT/blob/b5eff926bc1ffc8550a475ce4a2b4c3ca1ad320e/src/Graphics.cpp#L733

    image

    opened by tobiasmarciszko 2
  • Textures have black borders.

    Textures have black borders.

    First of all, this project is excellent, very easy to follow and perfectly understandable.

    I've been scratching my head about a few things in the rendered image and how I don't see these in my version. Notice in the screenshot I captured from the application, the area where the texture is supposed to wrap at its border, there is a black edge. This is mostly noticeable on the carpet in the image but also at all the edges of the tiles on the floor and walls. image Outputting "material.baseColor" of the primary hit reveals that source of the issue is the texture or the sampler. Viewing this model in my own application and other gLTF viewers, this is not the case. I believe this issue is caused by the padding of the texture data because of block compression as the texture dimensions are not divisible by 4.

    bug 
    opened by simco50 1
  • InstanceID is 24 bit total, not 32, this could cause issues with large scenes duo to packing

    InstanceID is 24 bit total, not 32, this could cause issues with large scenes duo to packing

    Hello, I was reading preprint of the book(RT Gems II, Chapter 14), and there's a mistake about InstanceID variable, as DXR spec says, it's 24 bit total, but bindless indices are store in the upper and lower 16 bits, this could cause issues if there will be more than 256 unique geometries(you have only 8 bits for upper indices), maybe you can split it 12/12 bits to solve this issue. Hope this will help.

    P.S. Here's the link to DXR spec reference https://microsoft.github.io/DirectX-Specs/d3d/Raytracing.html#instanceid

    bug 
    opened by zuba 1
  • Failed to create state object

    Failed to create state object

    I got an error of "Failed to create state object", the return value by "d3d.device->CreateStateObject" indicates that "E_INVALIDARG One or more arguments are invalid."

    But I just went through the code and it all looks fine (debug layer doesn't report any error) and I have no problem running the IntroToDXR. Could you give me a hint about what could be problem?

    I have a GTX 1070 with driver version 471.11, Windows SDK version 10.0.19041.0.

    opened by endlessPi 0
Releases(1.1)
Owner
Jakub Boksansky
Caffeinist & Computer Graphics Engineer, former Researcher @ CTU FEE Prague
Jakub Boksansky
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

Apress 862 Dec 29, 2022
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

Apress 684 Dec 29, 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

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

Arnon Marcus 48 Dec 28, 2022
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 Sampl

Christoph Peters 290 Dec 19, 2022
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

Joshua Vega 1 Oct 19, 2021
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

Andrei Treefonov 7 Dec 27, 2022
Implementation of Peter Shirley's Ray Tracing In One Weekend book using Vulkan and NVIDIA's RTX extension.

Ray Tracing In Vulkan My implementation of Peter Shirley's Ray Tracing in One Weekend books using Vulkan and NVIDIA's RTX extension (formerly VK_NV_ra

Tanguy Fautre 862 Dec 31, 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

NVIDIA GameWorks 601 Jan 8, 2023
🌞 A physically based monte carlo path tracer written in C++

Physically Based Path Tracer The below 3D model for the Head of Michelangelo's David bust was taken from this link. Other .obj files taken from The St

Aman Shenoy 45 Dec 27, 2022
A Hydra-enabled GPU path tracer that supports MaterialX.

A Hydra-enabled GPU path tracer that supports MaterialX.

Pablo Delgado 170 Dec 24, 2022