Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hlsl path tracer #188

Open
wants to merge 112 commits into
base: bxdf_unit_tests
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
881e40b
Update Bloom example, removed memory barriers on FFT
Fletterio Jan 22, 2025
444c917
Implement Ray Tracing Demo
Jan 22, 2025
c991e20
Add ImGui Overlay
Jan 22, 2025
6ac8f88
Implement multiple light type
Jan 22, 2025
9091da1
Implement callable shader
Jan 22, 2025
d303356
Implement procedural geometry intersection shader demo
Jan 24, 2025
f261f7c
Add Readme
Jan 24, 2025
7b5059c
Fix alignment issue of scratch buffer
Jan 24, 2025
8cbb0dc
Fix alignment issue of scratch buffer
Jan 24, 2025
a9d5f8b
Fix alignment issue of scratch buffer
Jan 24, 2025
feedf65
Reduce Push Constant Size and skip compacting procedural geometries
Jan 24, 2025
e369368
Fix occlusion of procedural geometries
Jan 24, 2025
c2c82d4
71: cache shaders
alichraghi Jan 24, 2025
34a3fa9
Remove unnecesary log
Jan 24, 2025
ec88268
Change recursion depth to 1 so the demo can be run on more devices.
Jan 25, 2025
d21c22c
Temporarily remove procedural geometries to debug crash on amd cards.
Jan 25, 2025
bc093c7
Use Nabla AABB type instead creating another aabb type
Jan 25, 2025
1dc682a
Fix query compact blas size issue
Jan 26, 2025
eab0f70
copied ex 30 to new ex 31
keptsecret Feb 3, 2025
8521123
ignore events on imgui focus
keptsecret Feb 3, 2025
b171724
initial files for pathtracer
keptsecret Feb 4, 2025
af35393
intersection logic
keptsecret Feb 5, 2025
ab58218
Reorder hlsl datastructure to reduce padding and make it more compact
Feb 5, 2025
6966942
Adjust changes to SPhysicalDeviceLimit regarding shaderGroupHandleSize
Feb 5, 2025
ef02db2
Adjust changes to ray tracing SShaderGroupParams
Feb 5, 2025
5a5fbfe
changes to intersection logic
keptsecret Feb 6, 2025
c810949
Adjust ray tracing pipeline demo to remove SStridedBufferRegion
Feb 6, 2025
13251ca
Pack material into more compact representation before send to gpu.
Feb 6, 2025
85e67ad
completed material system?
keptsecret Feb 6, 2025
2c500b1
sphere nee stuff
keptsecret Feb 7, 2025
e6a9916
triangle sampling
keptsecret Feb 10, 2025
c48b5b9
Change ray tracing implementation from recursion to loop based
Feb 11, 2025
6dc25eb
rectangle sampling
keptsecret Feb 11, 2025
73b3f99
Assign Blas flag according the the primitives transparency
Feb 11, 2025
adb7bb6
Store material information in intersection shader
Feb 11, 2025
bc16d1b
Refactor shadow ray tracing implementation to use opacity instead of …
Feb 11, 2025
dc7db46
Remove unnecessary read of attenuation by miss shader
Feb 11, 2025
86f4f4b
Remove unnecsarry topLevelAs binding declaration
Feb 11, 2025
96f25ca
Rework gpu random value generation to use pcg hash and xoroshiro
Feb 11, 2025
583c0f9
Add trace ray indirect option
Feb 11, 2025
0797b33
Use matrix changes to reset frameAccumulationCounter
Feb 11, 2025
7409e4b
Remove comment in CCamera.hpp
Feb 11, 2025
f9c3fad
Remove unnecesarry calculation of vertex position
Feb 11, 2025
22bd6f9
nee stuff
keptsecret Feb 12, 2025
0da41df
Tidy up variable name and file name
Feb 12, 2025
3bb858b
scene representation, getmeasure for pt
keptsecret Feb 13, 2025
f5adbf6
moved scene rep out, some closest hit stuff
keptsecret Feb 14, 2025
159d153
sample light part of closest hit
keptsecret Feb 17, 2025
a7350db
fix bugs, reorganize traceRay
keptsecret Feb 18, 2025
8a4e0a9
sample bsdf in closest hit
keptsecret Feb 18, 2025
72104b8
set up path tracer render shader
keptsecret Feb 19, 2025
202c645
finish render shader
keptsecret Feb 20, 2025
2f77555
hlsl path tracer initial, bug fixes
keptsecret Feb 20, 2025
99aed47
fix shader bugs
keptsecret Feb 21, 2025
a1a8ec0
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 21, 2025
a802a97
bug fixes #3
keptsecret Feb 21, 2025
eed47e7
fix include when embed resources off
keptsecret Feb 24, 2025
6e26dae
fixed more bugs #4
keptsecret Feb 24, 2025
3827fd3
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 25, 2025
da661c0
fix compile hlsl shader bug
keptsecret Feb 25, 2025
f97757b
more bug fixes #5
keptsecret Feb 25, 2025
890c992
Update demo to use SShaderGroupHandle type
Feb 25, 2025
ee10d47
Merge branch 'master' into raytracing_pipeline_demo
Feb 25, 2025
19ad8b0
Fix spot light
Feb 25, 2025
8e759f2
more bug fixes #6
keptsecret Feb 26, 2025
eb38ef5
Adjust demo to ray_tracing_pipeline_demo fixes
Mar 3, 2025
2dfadfe
Merge branch 'master' into hlsl_path_tracer
keptsecret Mar 4, 2025
b1831d9
refactor to use new frisvad
keptsecret Mar 4, 2025
cb5662a
fix bugs again
keptsecret Mar 7, 2025
8eaa714
fix intersector, no use intersectdata
keptsecret Mar 7, 2025
4d3e046
removed intersectdata usage, fix emissive bug
keptsecret Mar 10, 2025
e7d4670
fixed light sampling nee
keptsecret Mar 10, 2025
077d150
1st working ver, sort of
keptsecret Mar 11, 2025
beac328
Remove raygenGroupStride
Mar 12, 2025
b2595a9
Merge branch 'master' into raytracing_pipeline_demo
Mar 12, 2025
6517442
Fix merge bug.
Mar 12, 2025
6465312
Fix demo to use the new traceRayIndirect
Mar 12, 2025
6abb635
fixed nan and accumulation going black problem
keptsecret Mar 13, 2025
1eee3ca
fixed triangle light, rectangle needs checking
keptsecret Mar 13, 2025
011fbfb
simplified material data
keptsecret Mar 13, 2025
4d1dca4
Small fixes on ray trace pipeline demo.
Mar 13, 2025
cc84091
Optimize ray tracing demo occlusion tracing
Mar 13, 2025
63b64e3
made scene a static global var
keptsecret Mar 14, 2025
7bd69e9
fixed most of rectangle light issues, still red pixels
keptsecret Mar 14, 2025
38d8285
Use unused shader instead of stub shader for occlusion ray miss shader.
Mar 14, 2025
ab0aa12
fix for nan samples
keptsecret Mar 17, 2025
96c7497
revert to intial scene settings
keptsecret Mar 17, 2025
b5194ef
Merge branch 'master' into hlsl_path_tracer
keptsecret Mar 17, 2025
f96dfcc
Use nbl::hlsl::_static_cast for converting MaterialPacked to Material…
Mar 17, 2025
88b3275
Fix create shader binding table to use the new span api
Mar 17, 2025
cca8f72
Some optimization on ray tracing demo
Mar 18, 2025
b483aa6
better hlsl dispatch
keptsecret Mar 19, 2025
773733d
refactor NEE to use templated light types and sampling
keptsecret Mar 19, 2025
b889b60
use 1D workgroup dispatch
keptsecret Mar 19, 2025
79ee9da
removed obsolete commented sections
keptsecret Mar 19, 2025
ca8f2ec
some minor corrections
keptsecret Mar 19, 2025
c904134
Return materialId instead of materialPacked from rchit
Mar 20, 2025
6b3ae54
Add ray tracing no null flags
Mar 20, 2025
b2abf00
Add setRayTracingStackSize in the demo
Mar 20, 2025
e95f09d
changed workgroup size to 512
keptsecret Mar 21, 2025
56994a9
workgroup size 512 for sure this time
keptsecret Mar 21, 2025
3cdfb4b
use morton and virtual indexing
keptsecret Mar 24, 2025
5f93cec
reverted virtual index, fix hlsl colors
keptsecret Mar 24, 2025
78de4f5
fixed some bugs for cpp compat
keptsecret Mar 25, 2025
f823771
use dropdown, more options
keptsecret Mar 28, 2025
1535561
added persistent workgroup toggle
keptsecret Mar 28, 2025
6074c7c
Merge pull request #173 from kevyuu/raytracing_pipeline_demo
devshgraphicsprogramming Mar 31, 2025
6766420
make RT pipeline example work when `NBL_EMED_RESOURCES=OFF`
Mar 31, 2025
0905053
Correct Alpha handling in RT Pipeline example, also work around https…
Mar 31, 2025
699f263
clean up the code a bit more, address comments in https://github.com/…
Mar 31, 2025
bb2fd06
do shadows without any closest hit shaders, one miss shader instead
Mar 31, 2025
3400a2a
Merge branch 'master' into hlsl_path_tracer
keptsecret Apr 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions 31_HLSLPathTracer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
include(common RESULT_VARIABLE RES)
if(NOT RES)
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
endif()

if(NBL_BUILD_IMGUI)
set(NBL_INCLUDE_SERACH_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)

list(APPEND NBL_LIBRARIES
imtestengine
"${NBL_EXT_IMGUI_UI_LIB}"
)

nbl_create_executable_project("" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "${NBL_LIBRARIES}" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")

if(NBL_EMBED_BUILTIN_RESOURCES)
set(_BR_TARGET_ ${EXECUTABLE_NAME}_builtinResourceData)
set(RESOURCE_DIR "app_resources")

get_filename_component(_SEARCH_DIRECTORIES_ "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
get_filename_component(_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
get_filename_component(_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)

file(GLOB_RECURSE BUILTIN_RESOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}/*")
foreach(RES_FILE ${BUILTIN_RESOURCE_FILES})
LIST_BUILTIN_RESOURCE(RESOURCES_TO_EMBED "${RES_FILE}")
endforeach()

ADD_CUSTOM_BUILTIN_RESOURCES(${_BR_TARGET_} RESOURCES_TO_EMBED "${_SEARCH_DIRECTORIES_}" "${RESOURCE_DIR}" "nbl::this_example::builtin" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}")

LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} ${_BR_TARGET_})
endif()
endif()


Loading