Skip to content

Commit 3400a2a

Browse files
committed
Merge branch 'master' into hlsl_path_tracer
2 parents 1535561 + bb2fd06 commit 3400a2a

20 files changed

+2728
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
include(common RESULT_VARIABLE RES)
2+
if(NOT RES)
3+
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
4+
endif()
5+
6+
if(NBL_BUILD_IMGUI)
7+
set(NBL_INCLUDE_SERACH_DIRECTORIES
8+
"${CMAKE_CURRENT_SOURCE_DIR}/include"
9+
)
10+
11+
list(APPEND NBL_LIBRARIES
12+
imtestengine
13+
"${NBL_EXT_IMGUI_UI_LIB}"
14+
)
15+
16+
nbl_create_executable_project("" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "${NBL_LIBRARIES}" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")
17+
18+
if(NBL_EMBED_BUILTIN_RESOURCES)
19+
set(_BR_TARGET_ ${EXECUTABLE_NAME}_builtinResourceData)
20+
set(RESOURCE_DIR "app_resources")
21+
22+
get_filename_component(_SEARCH_DIRECTORIES_ "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
23+
get_filename_component(_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
24+
get_filename_component(_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
25+
26+
file(GLOB_RECURSE BUILTIN_RESOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}/*")
27+
foreach(RES_FILE ${BUILTIN_RESOURCE_FILES})
28+
LIST_BUILTIN_RESOURCE(RESOURCES_TO_EMBED "${RES_FILE}")
29+
endforeach()
30+
31+
ADD_CUSTOM_BUILTIN_RESOURCES(${_BR_TARGET_} RESOURCES_TO_EMBED "${_SEARCH_DIRECTORIES_}" "${RESOURCE_DIR}" "nbl::this_example::builtin" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}")
32+
33+
LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} ${_BR_TARGET_})
34+
endif()
35+
endif()
36+
37+

71_RayTracingPipeline/Readme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Vulkan Ray Tracing Pipeline Demo
2+
![finalResult](docs/Images/final_result.png)
3+
4+
The scene is rendered using two ray. The first ray(primary ray) is shoot from the camera/generation shader and the second ray(occlusion ray) is shoot from the closest hit shader.
5+
To test intersection shader, the acceleration structures consist of two types of geometries. The cubes are stored as triangle geometries while the spheres are stored as procedural geometries.
6+
To test callable shader, we calculate lighting information of different type in its own callable shader
7+
8+
## Shader Table Layout
9+
![shaderBindingTable](docs/Images/shader_binding_table.png)
10+
11+

0 commit comments

Comments
 (0)