Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
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
5a5fbfe
changes to intersection logic
keptsecret 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
6dc25eb
rectangle sampling
keptsecret Feb 11, 2025
22bd6f9
nee stuff
keptsecret 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
8e759f2
more bug fixes #6
keptsecret Feb 26, 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
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
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
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
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
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
3400a2a
Merge branch 'master' into hlsl_path_tracer
keptsecret Apr 3, 2025
52c1aa5
ready changes for mesh_loaders merge, requires examples.hpp from mesh…
keptsecret Jun 27, 2025
d596f75
merge mesh_loaders, fix conflict
keptsecret Jun 27, 2025
c43c93b
cpp fixes so it compiles at least
keptsecret Jun 27, 2025
8b31859
a bazillion fixes since last time bxdf usages changed
keptsecret Jun 27, 2025
ac36695
Merge branch 'master' into hlsl_path_tracer
keptsecret Aug 28, 2025
3d206fd
RWMC setup
Przemog1 Sep 25, 2025
2107be7
Implemented splatting
Przemog1 Sep 29, 2025
57a6a0f
Fixed splatting
Przemog1 Oct 1, 2025
389248c
Implemented reweighting
Przemog1 Oct 1, 2025
ca8c232
Added "enable RWMC" toggle
Przemog1 Oct 7, 2025
04296d9
Added accumulators
Przemog1 Oct 16, 2025
6168e14
Fixed cascade settings initialization
Przemog1 Oct 16, 2025
8ecc60f
Refactor
Przemog1 Oct 18, 2025
bbc8ab8
Fixed rwmc persistent workgroups
Przemog1 Oct 20, 2025
3ffe973
Refactor
Przemog1 Nov 10, 2025
9c60e99
Merge branch 'master' into hlsl_path_tracer
keptsecret Nov 12, 2025
ecbf92d
refactor some bxdf usage
keptsecret Nov 13, 2025
716ca24
ImGuizmo for lights
karimsayedre Nov 13, 2025
badb4a6
Refactored resolve.comp.hlsl
Przemog1 Nov 13, 2025
05226bf
refactor bxdf usage
keptsecret Nov 14, 2025
aced36c
fix missing hash problem, working path tracer
keptsecret Nov 14, 2025
8b8fab0
added checks to invalid samples
keptsecret Nov 14, 2025
d4e5754
merged rwmc, fix conflicts
keptsecret Nov 14, 2025
16c8d42
fix errors from merge
keptsecret Nov 14, 2025
310263e
fixes to rectangle light sampling nans (that regressed somehow)
keptsecret Nov 17, 2025
c123d17
minor changes to used workgroup size
keptsecret Nov 17, 2025
b7eb8a3
refactor partitionRandVar usage
keptsecret Nov 18, 2025
6688843
refactor box muller usage
keptsecret Nov 19, 2025
f2e79ec
moved light, ray, objectID structs into userspace example_common; pat…
keptsecret Nov 19, 2025
6c9dc30
reduce nee duplicate code, added template scalar_type to shapes + ref…
keptsecret Nov 20, 2025
52c654b
moved bxdfs array into mat system, lights array into nee
keptsecret Nov 20, 2025
dc91a9e
partial spec Scene by light shape, ProceduralShapeType in namespace
keptsecret Nov 21, 2025
c342c4c
moved a lot of defines into static const in Scene, moved some render …
keptsecret Nov 21, 2025
d0cc24e
changed sampleSequence to bda
keptsecret Nov 24, 2025
90631e6
fixes compacting QuantizedSequence
keptsecret Nov 25, 2025
39c686f
moved everything into the correct namespaces/user space
keptsecret Nov 25, 2025
575d9e6
Merge branch 'hlsl_path_tracer' into imguizmo-lights
karimsayedre Nov 25, 2025
1508702
path tracer uses concepts on component types
keptsecret Nov 26, 2025
08d8396
check for storagePushConstant16, fix typos
keptsecret Nov 26, 2025
c34a0eb
Fixed bugs with light transform, uniform sphere scaling, disabled Z a…
karimsayedre Nov 26, 2025
cbf34e5
Merge remote-tracking branch 'origin/hlsl_path_tracer' into imguizmo-…
karimsayedre Nov 26, 2025
b5a70b8
pack rwmc params, fix sobol sampler usage
keptsecret Nov 27, 2025
9110125
merge imguizmo-lights, fix conflicts
keptsecret Nov 28, 2025
dd7de7a
changed movements keys to arrow because it conflicts with gizmo controls
keptsecret Nov 28, 2025
b9713ce
added additional sphere, extra material type (iridescent conductor)
keptsecret Dec 4, 2025
c0eda4b
adjust iridescent mat to look better, simplified IsBSDF function
keptsecret Dec 5, 2025
c1c71ee
adds iridescent transmission sphere, minor bug fixes and refactors fr…
keptsecret Dec 9, 2025
fb24a25
refactor sampling decode use
keptsecret Dec 9, 2025
d58737e
refactor quantized sequence usage, scene not templated so we can decl…
keptsecret Dec 11, 2025
456f9e2
fix sphere declarations
keptsecret Dec 11, 2025
6f9bdc3
Merge branch 'master' into hlsl_path_tracer
keptsecret Dec 15, 2025
feed271
fix quantized sequence usage, generating samples for sequence
keptsecret Dec 15, 2025
12a17d0
clamp result of decode quantized sequence
keptsecret Dec 15, 2025
ea3ec9e
revert previous commit because it's not above 1.0 anymore
keptsecret Dec 15, 2025
cb14ea4
Merge branch 'master' into hlsl_path_tracer
keptsecret Dec 16, 2025
6956bf1
refactor partitionRandVar changes
keptsecret Dec 16, 2025
5b5df48
refactor rwmc splatting params usage
keptsecret Dec 16, 2025
cf20436
remove assigning texture inside struct
keptsecret Dec 16, 2025
facdf42
moved accessor impl into user space
keptsecret Dec 16, 2025
fd034ec
refactor splatting params usage again
keptsecret Dec 16, 2025
caa80c2
fix luma coefficient
keptsecret Dec 17, 2025
94a9ad9
merge master, fix conflicts
keptsecret Jan 8, 2026
00f948e
Merge branch 'master' into hlsl_path_tracer
keptsecret Jan 9, 2026
ffeee98
refactor quantized sequence usage
keptsecret Jan 9, 2026
170c4c3
Merge branch 'master' into hlsl_path_tracer
keptsecret Jan 19, 2026
b3a1f25
refactor quantized sequence decode usage again
keptsecret Jan 19, 2026
d6c514d
Merge branch 'master' into hlsl_path_tracer
keptsecret Jan 20, 2026
1376708
refactor removal of core::matrix
keptsecret Jan 20, 2026
bb4743f
refactor use new morton
keptsecret Jan 21, 2026
1669353
refactor with changes to spherical tri, rect usage
keptsecret Jan 21, 2026
60a943a
refactor changes to spherical rectangle usage
keptsecret Jan 22, 2026
78b2c5a
remove references to glsl shaders in main
keptsecret Jan 22, 2026
2239c5d
minor changes to randgen, removed file with only one var
keptsecret Jan 22, 2026
357238f
moved out polygon method enum to user space, changed include guard fo…
keptsecret Jan 23, 2026
7b07af8
reorganize splatting params, push constants
keptsecret Jan 23, 2026
a282632
moved out path tracer to nabla, removed redundant common stuff
keptsecret Jan 23, 2026
4bfab5f
moved ray gen out to nabla
keptsecret Jan 23, 2026
8ebddb8
fixed persistent workgroups variant
keptsecret Jan 26, 2026
f1389ba
fix imguizmo init and matrices
keptsecret Jan 26, 2026
023defb
removed redundant scene members
keptsecret Jan 26, 2026
4b905ac
added ui toggle
keptsecret Jan 27, 2026
9f48316
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 2, 2026
676e85e
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 4, 2026
9c1616f
fixes to get it to work again
keptsecret Feb 4, 2026
c0827e2
merge master, fix conflicts
keptsecret Feb 6, 2026
09c6b70
fix coord out of bounds bug
keptsecret Feb 6, 2026
cf1c85a
another minor fix for oob
keptsecret Feb 6, 2026
46237a7
refactor changes to various sampling functions so it runs
keptsecret Feb 13, 2026
a54c67f
refactor object id type alias concept
keptsecret Feb 13, 2026
5f3bdfa
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 16, 2026
4246192
RWMC Fixes
Przemog1 Feb 16, 2026
635e8af
refactor concept changes for mat system and nee
keptsecret Feb 16, 2026
d1cbf45
refactor nee methods change
keptsecret Feb 16, 2026
c90d60b
refactor scene to do mapping of object id to light/mat id
keptsecret Feb 16, 2026
130e049
Update RWMC splatting parameter packing
AnastaZIuk Feb 16, 2026
c4ab4af
renamed constants in camelcase
keptsecret Feb 17, 2026
190c19e
refactor intersector to return struct data
keptsecret Feb 17, 2026
fffd7bc
refactor randGen to return unorm float, also use dim adaptor recursive
keptsecret Feb 17, 2026
08b8d61
ray struct now polymorphic on polygon method, new methods to init data
keptsecret Feb 17, 2026
40ba763
Address RWMC resolve review fixes
AnastaZIuk Feb 17, 2026
c531404
Update RWMC example packed parameters and accessor API
AnastaZIuk Feb 17, 2026
af29d65
Rename packed splatting fields for clarity
AnastaZIuk Feb 17, 2026
393242c
nee method to return env radiance, moved around some vars
keptsecret Feb 18, 2026
6a05e24
refactor material system stores emissive mat, light gets mat id, nee …
keptsecret Feb 18, 2026
cfa1cc1
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 19, 2026
f3e4f5d
refactor assigning new members
keptsecret Feb 19, 2026
9752ed9
refactor nee to choose light and take material system
keptsecret Feb 19, 2026
f678ea7
merged rwmc changes
keptsecret Feb 19, 2026
97cab4d
fix problems from merge
keptsecret Feb 19, 2026
605fe4b
material system applies albedo
keptsecret Feb 19, 2026
cf43879
refactor nee take scene as function param
keptsecret Feb 19, 2026
1b0baf1
refactor intersector has traceShadowRay, nee return also has light ob…
keptsecret Feb 19, 2026
f44f0aa
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 20, 2026
70b4554
more ray methods
keptsecret Feb 20, 2026
085a6ed
refactor added some more getters and setters to ray
keptsecret Feb 20, 2026
dfbb2fd
refactor more ray getter/setters, tolerance methods
keptsecret Feb 20, 2026
2fb0002
Merge branch 'master' into hlsl_path_tracer
keptsecret Feb 23, 2026
a8ec169
refactor to provide methods required by concepts
keptsecret Feb 23, 2026
7610bd3
refactor ray and related for ray type concept
keptsecret Feb 23, 2026
2729e11
removed imguitestengine from cmake file (unused)
keptsecret Feb 23, 2026
dd27f47
refactor to use resolve param create struct
keptsecret Feb 23, 2026
d7ecb8a
renamed traceRay, renamed polygon method enum
keptsecret Feb 23, 2026
a09ab84
cascade accessor only uses 3 components, minor fixes to main
keptsecret Feb 23, 2026
6b04a70
change material id and light id type to structs, refactor material li…
keptsecret Feb 24, 2026
64ba310
minor fixes to nee, moved gui controlled stuff into one struct
keptsecret Feb 24, 2026
6a19568
put everything into the same descriptor set
keptsecret Feb 24, 2026
3b85362
split different scenes into different hlsl files, made them not templ…
keptsecret Feb 24, 2026
5e207c8
make ray templated on payload
keptsecret Feb 24, 2026
b18c162
comments to clarify randgen parameters
keptsecret Feb 24, 2026
c861674
removed intersect mode because it's pointless, made object id 16 bit …
keptsecret Feb 24, 2026
2b4c44e
refactor use splatting param create
keptsecret Feb 24, 2026
a02c060
refactor scene to return interaction
keptsecret Feb 25, 2026
171aa95
refactor intersector, nee concept changes
keptsecret Feb 25, 2026
d9bea1f
added custom interactions structs that stores isInteractionMaterialBS…
keptsecret Feb 25, 2026
07c43a6
fix normalize throughputCIE, refactor changes to method names
keptsecret Feb 25, 2026
480e73a
account for if otherTechniqueHeuristic is 0
keptsecret Feb 26, 2026
666f911
refactor mat system takes in aniso types
keptsecret Feb 26, 2026
8f5ccf6
refactor material system pdf method, ray payload shouldDoMIS method
keptsecret Feb 26, 2026
66bface
refactor scene getIntersection method
keptsecret Feb 26, 2026
80b0801
refactor minor name changes
keptsecret Feb 27, 2026
ebff013
refactor method for intersection data to get geometric normal
keptsecret Feb 27, 2026
d4a4d13
refactor pass ray to sampleMeasure, ray gen outside
keptsecret Feb 27, 2026
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
40 changes: 40 additions & 0 deletions 31_HLSLPathTracer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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
imguizmo
"${NBL_EXT_IMGUI_UI_LIB}"
Nabla::ext::FullScreenTriangle
)

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