Skip to content
项目

关于

Code example for CEDEC 2024 "Easy Start with GPU Ray Tracing! From GPU Programming Basics to ReSTIR".

设计与媒体

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

CEDEC-2024-RT

English | 日本語

This is the code example for CEDEC 2024 "Easy Start with GPU Ray Tracing! From GPU Programming Basics to ReSTIR".

Please also refer to the slides used during the presentation.

Requirements

  • AMD GPU or NVIDIA GPU
  • CUDA SDK (>= 12.2) (For NVIDIA GPU users)

How to Build

First, download the dependent libraries.

git submodule update --init --recursive

Windows

Run Premake to create Visual Studio solution files.

./premake5.exe vs2022

For NVIDIA users, add --nvidia option when running premake.

./premake5.exe --nvidia vs2022

Open build/CEDEC_2024_RT.sln in Visual Studio and build.

Linux

Run Premake to create a Makefile.

./premake5 gmake2

For NVIDIA users, add --nvidia option when running premake.

./premake5.exe --nvidia gmake2

Execute the build using make in the build directory.

cd build
make

Build Configurations

Mode CPU Code Optimization GPU Code Optimization
Debug ✔
DebugGpu
RelWithDebInfo ✔ ✔

About Examples

There are 10 implementation examples, ranging from very simple ones to ReSTIR implementation.

Mouse Operation Description
LMB Rotate camera
RMB Zoom in/out camera
MMB Move camera

01_helloworld

An example that simply fills pixels with a gradient.

02_triangle

An example of displaying a triangle using ray tracing.

03_cornellbox

An example of displaying a Cornell box using ray tracing. It directly displays the color of the triangle hit by the ray from the camera.

04_ao

An example of calculating ambient occlusion using ray tracing in a simple Cornell box scene.

05_ao_boundingbox

Calculates ambient occlusion in a more complex scene. It's slightly faster as it terminates calculations early using AABBs. You can see the performance of brute-force calculation by using #define ENABLE_AABB_CULLING 0 in 05_ao_boundingbox.cu.

Advanced Tips

Using #define ENABLE_AABB_WARP_LEVEL_CULLING 1 performs an additional level of hierarchical culling with AABBs that group 32 together.

06_ao_hiprt

A version that uses HIPRT for ray-scene intersection tests. Calculation becomes overwhelmingly faster on both NVIDIA and AMD GPUs. Especially for AMD GPUs, it can utilize hardware ray tracing capabilities.

07_pt

An example of path tracing.

Operation Description
A Toggle Accumulation On/Off
S Save screenshot

08_nee

An example implementing Next Event Estimation. Compared to naive path tracing, it has a higher chance of reaching light sources, thus reducing noise.

Operation Description
A Toggle Accumulation On/Off
S Save screenshot

09_ris

An implementation example of Resampled Importance Sampling (RIS).

Operation Description
1 Toggle RIS On/Off
2 Include/Exclude Visibility in Target function evaluation
A Toggle Accumulation On/Off
S Save screenshot

10_restir_di

An implementation example of ReSTIR DI.

Operation Description
1 Toggle Temporal Resampling On/Off
2 Toggle Spatial Resampling On/Off
3 Include/Exclude Visibility in Target function evaluation
4 Toggle Visibility reuse On/Off
A Toggle Accumulation On/Off
S Save screenshot

Dependencies

Contact

If you have any questions about the code or slide content, please contact:

Name Address
Kenta Eto [email protected]
Atsushi Yoshimura [email protected]

Citations

探索相关项目

加载中…