Skip to content

Commit d642e5d

Browse files
committed
AMD Capsaicin Framework v1.1
1 parent 7e3beea commit d642e5d

File tree

189 files changed

+19708
-6402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+19708
-6402
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ build
22
.DS_Store
33
imgui.ini
44
.vscode
5+
.vs
6+
out

.gitmodules

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
[submodule "third_party/CLI11"]
55
path = third_party/CLI11
66
url = https://github.com/CLIUtils/CLI11
7-
[submodule "third_party/tinyexr"]
8-
path = third_party/tinyexr
9-
url = https://github.com/syoyo/tinyexr
10-
[submodule "third_party/miniz"]
11-
path = third_party/miniz
12-
url = https://github.com/richgel999/miniz.git
137
[submodule "assets/CapsaicinTestMedia"]
148
path = assets/CapsaicinTestMedia
15-
url = ../CapsaicinTestMedia.git
9+
url = https://github.com/GPUOpen-LibrariesAndSDKs/CapsaicinTestMedia.git

CMakeLists.txt

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
cmake_minimum_required(VERSION 3.10.0)
1+
cmake_minimum_required(VERSION 3.24.0)
22

33
project(Capsaicin
4-
VERSION 1.0.0
4+
VERSION 1.1.0
55
DESCRIPTION "AMD experimental real-time rendering framework designed for graphics research and development"
66
)
77

8-
set(GFX_BUILD_EXAMPLES OFF CACHE BOOL "Build gfx examples")
9-
set(TINYGLTF_BUILD_LOADER_EXAMPLE OFF CACHE BOOL "Build loader_example")
10-
118
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
129

1310
# Set preprocessor definitions
14-
add_definitions(/MP
15-
-D_HAS_ITERATOR_DEBUGGING=0
11+
add_definitions(
12+
/MP
1613
)
1714

18-
# Gather dependencies
19-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/gfx)
20-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/CLI11)
21-
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
22-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/miniz)
15+
# Disable unused parameters from 3rd party directories
16+
set(GFX_BUILD_EXAMPLES OFF CACHE BOOL "")
17+
set(BUILD_TESTING OFF CACHE BOOL "")
2318

24-
# Set linker flags
25-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
19+
# Enable gfx options
20+
set(GFX_ENABLE_SCENE ON CACHE BOOL "")
21+
set(GFX_ENABLE_GUI ON CACHE BOOL "")
2622

27-
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
23+
# Gather dependencies
24+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/gfx EXCLUDE_FROM_ALL)
25+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/CLI11 EXCLUDE_FROM_ALL)
26+
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
2827

2928
# Organize third party projects
3029
set_target_properties(uninstall PROPERTIES FOLDER "third_party")
31-
set_target_properties(miniz PROPERTIES FOLDER "third_party")
3230
set_target_properties(gfx PROPERTIES FOLDER "third_party")
3331
set_target_properties(CLI11 PROPERTIES FOLDER "third_party")
3432
set_target_properties(tinyobjloader PROPERTIES FOLDER "third_party/gfx_deps")
33+
set_target_properties(tinyexr PROPERTIES FOLDER "third_party/gfx_deps")
3534
set_target_properties(ktx PROPERTIES FOLDER "third_party/gfx_deps")
3635
set_target_properties(astcenc-avx2-static PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps")
3736
set_target_properties(ktx_read PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps")
@@ -65,18 +64,11 @@ ELSE()
6564
SET(CAPSAICIN_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} CACHE STRING "Path for archive output files")
6665
ENDIF()
6766

67+
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/install")
68+
6869
# Build Capsaicin
6970
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
7071

7172
# Set up startup project
7273
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
7374
PROPERTY VS_STARTUP_PROJECT scene_viewer)
74-
75-
# Install assets and shaders directories
76-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION . FILES_MATCHING PATTERN "*.*")
77-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/core/shaders DESTINATION src/core FILES_MATCHING PATTERN "*.*")
78-
79-
# Configure CPack
80-
set(CPACK_GENERATOR "ZIP")
81-
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
82-
include(CPack)

CMakePresets.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"version": 3,
3+
"configurePresets": [
4+
{
5+
"name": "msvc-base",
6+
"description": "Target Windows with the Visual Studio development environment.",
7+
"hidden": true,
8+
"generator": "Ninja",
9+
"binaryDir": "${sourceDir}/out/build/${presetName}",
10+
"installDir": "${sourceDir}/out/install/${presetName}",
11+
"cacheVariables": {
12+
"CMAKE_C_COMPILER": "cl.exe",
13+
"CMAKE_CXX_COMPILER": "cl.exe"
14+
},
15+
"toolset": {
16+
"value": "host=x64",
17+
"strategy": "external"
18+
},
19+
"architecture": {
20+
"value": "x64",
21+
"strategy": "external"
22+
},
23+
"condition": {
24+
"type": "equals",
25+
"lhs": "${hostSystemName}",
26+
"rhs": "Windows"
27+
}
28+
},
29+
{
30+
"name": "x64-debug",
31+
"displayName": "x64-Debug",
32+
"description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)",
33+
"inherits": "msvc-base",
34+
"cacheVariables": {
35+
"CMAKE_BUILD_TYPE": "Debug"
36+
}
37+
},
38+
{
39+
"name": "x64-release-with-debug-info",
40+
"displayName": "x64-RelWithDebInfo",
41+
"description": "Target Windows (64-bit) with the Visual Studio development environment. (Release with Debug Info)",
42+
"inherits": "msvc-base",
43+
"cacheVariables": {
44+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
45+
}
46+
},
47+
{
48+
"name": "x64-release",
49+
"displayName": "x64-Release",
50+
"description": "Target Windows (64-bit) with the Visual Studio development environment. (Release)",
51+
"inherits": "msvc-base",
52+
"cacheVariables": {
53+
"CMAKE_BUILD_TYPE": "Release"
54+
}
55+
}
56+
],
57+
"buildPresets": [
58+
{
59+
"name": "debug-build-windows",
60+
"displayName": "x64-Debug",
61+
"configurePreset": "x64-debug",
62+
"description": "Debug Windows build"
63+
},
64+
{
65+
"name": "release-with-debug-info-build-windows",
66+
"displayName": "x64-RelWithDebInfo",
67+
"configurePreset": "x64-release-with-debug-info",
68+
"description": "Release with Debug Info Windows build"
69+
},
70+
{
71+
"name": "release-build-windows",
72+
"displayName": "x64-Release",
73+
"configurePreset": "x64-release",
74+
"description": "Release Windows build"
75+
}
76+
]
77+
}

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
1+
Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ Features:
1515

1616
![Capsaicin](docs/images/scene_viewer.png)
1717

18-
## GI-1.0
18+
## GI-1.1
1919

20-
We used Capsaicin to implement our GI-1.0 technique for estimating diffuse indirect illumination in real-time.
20+
We used Capsaicin to implement our GI-1.1 technique for estimating diffuse and specular indirect illumination in real-time.
2121

2222
The technique uses two levels of radiance caching to allow for reduced sampling rate in order to improve performance while making the most of every ray through better sampling.
2323

24-
Please refer to our [publication](https://gpuopen.com/download/publications/GPUOpen2022_GI1_0.pdf) for more technical details.
24+
Please refer to our [GI-1.0 technical report](https://gpuopen.com/download/publications/GPUOpen2022_GI1_0.pdf) and [GI-1.1 paper](https://gpuopen.com/download/publications/SA2023_RealTimeReflection.pdf) for more technical details.
2525

2626
#### Note on light support
2727

28-
GI-1.0 is primarily an indirect lighting solution and as such is expected to be combined with an existing direct lighting technique for integration into a rendering pipeline.
28+
GI-1.1 is primarily an indirect lighting solution and as such is expected to be combined with an existing direct lighting technique for integration into a rendering pipeline.
2929

3030
All common light types are supported when evaluating the indirect lighting component (e.g., point lights, spot lights, etc.) using our grid-based light sampler and (optional) reservoir-based resampling.
3131

@@ -60,15 +60,43 @@ Capsaicin uses the [CMake](https://cmake.org/) build system. See the [Getting St
6060

6161
## Citation
6262

63-
If Capsaicin is used any any published work, ensure to cite it using:
63+
If Capsaicin is used in any published work, please ensure to cite it using:
6464

6565
```bibtex
6666
@Misc{Capsaicin23,
67-
author = {Guillaume Boissé, Matthew Oliver, Sylvain Meunier, Héloïse Dupont de Dinechin and Kenta Eto},
67+
author = {Boissé, Guillaume and Oliver, Matthew and Meunier, Sylvain and Dupont de Dinechin, Héloïse and Eto, Kenta},
6868
title = {The {AMD Capsaicin Framework}},
6969
year = {2023},
70-
month = {5},
70+
month = {8},
7171
url = {https://github.com/GPUOpen-LibrariesAndSDKs/Capsaicin},
72-
note = {\url{https://github.com/GPUOpen-LibrariesAndSDKs/Capsaicin}}
72+
}
73+
```
74+
75+
If our techniques are referenced in any published work, please ensure to cite them using:
76+
77+
```bibtex
78+
@inproceedings{10.1145/3610543.3626167,
79+
author = {Eto, Kenta and Meunier, Sylvain and Harada, Takahiro and Boiss\'{e}, Guillaume},
80+
title = {Real-Time Rendering of Glossy Reflections Using Ray Tracing and Two-Level Radiance Caching},
81+
year = {2023},
82+
isbn = {9798400703140},
83+
publisher = {Association for Computing Machinery},
84+
address = {New York, NY, USA},
85+
url = {https://doi.org/10.1145/3610543.3626167},
86+
doi = {10.1145/3610543.3626167},
87+
abstract = {Estimation of glossy reflections remains a challenging topic for real-time renderers. Ray tracing is a robust solution for evaluating the specular lobe of a given BRDF; however, it is computationally expensive and introduces noise that requires filtering. Other solutions, such as light probe systems, offer to approximate the signal with little to no noise and better performance but tend to introduce additional bias in the form of overly blurred visuals. This paper introduces a novel approach to rendering reflections in real time that combines the radiance probes of an existing diffuse global illumination framework with denoised ray-traced reflections calculated at a low sampling rate. We will show how combining these two sources allows producing an efficient and high-quality estimation of glossy reflections that is suitable for real-time applications such as games.},
88+
booktitle = {SIGGRAPH Asia 2023 Technical Communications},
89+
articleno = {4},
90+
numpages = {4},
91+
keywords = {real-time, ray tracing, rendering},
92+
location = {<conf-loc>, <city>Sydney</city>, <state>NSW</state>, <country>Australia</country>, </conf-loc>},
93+
series = {SA '23}
94+
}
95+
96+
@misc{gi10,
97+
author = {Guillaume Boissé and Sylvain Meunier and Heloise de Dinechin and Pieterjan Bartels and Alexander Veselov and Kenta Eto and Takahiro Harada},
98+
title = {GI-1.0: A Fast Scalable Two-Level Radiance Caching Scheme for Real-Time Global Illumination},
99+
year = {2023},
100+
url = {https://gpuopen.com/download/publications/GPUOpen2022_GI1_0.pdf}
73101
}
74102
```

assets/CapsaicinTestMedia

Submodule CapsaicinTestMedia updated 131 files

0 commit comments

Comments
 (0)