Skip to content

Commit 838e368

Browse files
save our plan and correct nbl::ext project names
1 parent 5d24f9c commit 838e368

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

cmake/common.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
155155
endmacro()
156156

157157
macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUDES LIB_OPTIONS)
158-
set(LIB_NAME "IrrExt${EXT_NAME}")
158+
set(LIB_NAME "NblExt${EXT_NAME}")
159159
project(${LIB_NAME})
160160

161161
add_library(${LIB_NAME} ${LIB_SOURCES})

examples_tests/22.RaytracedAO/raytraceCommon.glsl

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,36 @@ layout(local_size_x = WORKGROUP_DIM, local_size_y = WORKGROUP_DIM) in;
1111
#endif
1212

1313

14+
/**
15+
Plan for lighting:
16+
17+
Path Guiding with Rejection Sampling
18+
Do path guiding with spatio-directional (directions are implicit from light IDs) acceleration structure, could be with complete disregard for light NEE.
19+
Obviously the budgets for directions are low, so we might need to only track important lights and group them. Should probably read the spatiotemporal reservoir sampling paper.
20+
21+
Each light gets a computed OBB and we use spherical OBB sampling (not projected solid angle, but we could clip) to generate the samples.
22+
Then NEE does perfect spherical sampling of the bounding volume.
23+
24+
The OBBs could be hierarchical, possibly.
25+
26+
OPTIMIZATION: Could possibly shoot an AnyHit to the front of the convex hull volume, and then ClosestHit between the front and back.
27+
BRDF sampling just samples the BSDF analytically (or gives up and samples only the path-guiding AS), uses Closest Hit and proceeds classically.
28+
There's essentially 3 ways to generate samples: NEE with PGAS (discrete directions), NEE with PGAS (for all incoming lights), BSDF Analytical.
29+
PROS: Probably a much better sample generation strategy, might clean up a lot of noise.
30+
CONS: We don't know the point on the surface we are going to hit (could be any of multiple points for a concave light), so we cannot cast a fixed length ray.
31+
We need to cast a ray to the furthest back side of the Bounding Volume, and it cannot be an just an AnyHit ray, it needs to have a ClosestHit shader that will compare
32+
if the hit instanceID==lightGroupID. It can probably be optimized so that it uses a different shadow-only + light-compare SBT. So it may take a lot longer to compute a sample.
33+
CONCLUSION:
34+
We'll either be generating samples:
35+
A) From PGAS CDF
36+
No special light structure, just PGAS + GAS.
37+
C) Spherical sampling of OBBs
38+
OBB List with a CDF for the whole list in PGAS, then analytical
39+
40+
Do we have to do 3-way MIS?
41+
**/
42+
43+
1444
struct SLight
1545
{
1646
#ifdef __cplusplus

src/nbl/ext/MitsubaLoader/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ nbl_create_ext_library_project(
5959

6060
add_compile_definitions(XML_STATIC)
6161

62-
add_dependencies(IrrExtMITSUBA_LOADER ${MITSUBA_LOADER_DEPENDENTS})
63-
target_link_libraries(IrrExtMITSUBA_LOADER INTERFACE ${MITSUBA_LOADER_DEPENDENT_LIBS})
62+
add_dependencies(NblExtMITSUBA_LOADER ${MITSUBA_LOADER_DEPENDENTS})
63+
target_link_libraries(NblExtMITSUBA_LOADER INTERFACE ${MITSUBA_LOADER_DEPENDENT_LIBS})

src/nbl/ext/RadeonRays/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ nbl_create_ext_library_project(
2222
""
2323
)
2424

25-
add_dependencies(IrrExtRADEON_RAYS ${RADEON_RAYS_DEPENDENTS})
26-
target_link_libraries(IrrExtRADEON_RAYS INTERFACE ${RADEON_RAYS_DEPENDENT_LIBS})
25+
add_dependencies(NblExtRADEON_RAYS ${RADEON_RAYS_DEPENDENTS})
26+
target_link_libraries(NblExtRADEON_RAYS INTERFACE ${RADEON_RAYS_DEPENDENT_LIBS})

0 commit comments

Comments
 (0)