Skip to content

Commit f4828a9

Browse files
[cleanup] Final fixes for the release
1 parent 062ea1f commit f4828a9

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
- Radiance Caching (RC):
88
- If RC is enabled, the guiding structure (i.e., `Field`) learns an
9-
approximation of multiple radiance quantities (in linear RGB)
10-
,such as outgoing and incoming radiance, irradiance, fluence, and
9+
approximation of multiple radiance quantities (in linear RGB),
10+
such as outgoing and incoming radiance, irradiance, fluence, and
1111
in-scattered radiance. These quantities can be queried using the
1212
`SurfaceSamplingDistribution` and `VolumeSamplingDistribution`
1313
classes. RC support can be enabled using the

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ The full version history can be found [here](./CHANGELOG.md)
5656

5757
- Radiance Caching (RC):
5858
- If RC is enabled, the guiding structure (i.e., `Field`) learns an
59-
approximation of multiple radiance quantities (in linear RGB)
60-
,such as outgoing and incoming radiance, irradiance, fluence, and
59+
approximation of multiple radiance quantities (in linear RGB),
60+
such as outgoing and incoming radiance, irradiance, fluence, and
6161
in-scattered radiance. These quantities can be queried using the
6262
`SurfaceSamplingDistribution` and `VolumeSamplingDistribution`
6363
classes. RC support can be enabled using the

doc/changelog_latest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- New (**Experimental**) Features:
44
- Radiance Caching (RC):
5-
- If RC is enabled, the guiding structure (i.e., `Field`) learns an approximation of multiple radiance quantities (in linear RGB) ,such as outgoing and incoming radiance, irradiance, fluence, and in-scattered radiance. These quantities can be queried using the `SurfaceSamplingDistribution` and `VolumeSamplingDistribution` classes.
5+
- If RC is enabled, the guiding structure (i.e., `Field`) learns an approximation of multiple radiance quantities (in linear RGB), such as outgoing and incoming radiance, irradiance, fluence, and in-scattered radiance. These quantities can be queried using the `SurfaceSamplingDistribution` and `VolumeSamplingDistribution` classes.
66
RC support can be enabled using the `OPENPGL_EF_RADIANCE_CACHES` CMake option. **Note:** Since the RC quantities are Monte-Carlo estimates, zero-value samples (`ZeroValueSampleData`) that are generated during rendering/training have to be passed/stored in the `SampleStorage` as well.
77
- Guided/Adjoint-driven Russian Roulette (GRR):
88
- The information stored in radiance caches can be used to optimize stochastic path termination decisions (a.k.a. Russian roulette) to avoid a significant increase in variance (i.e., noise) caused by early terminations, which can occur when using standard throughput-based RR strategies.

openpgl/data/PathSegmentDataStorage.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ struct PathSegmentDataStorage
261261
}
262262

263263
bool directLightSample = false;
264+
#ifdef OPENPGL_RADIANCE_CACHES
264265
float misWeight = 1.f;
266+
#endif
265267
// evalaute the incident radiance the incident
266268
openpgl::Vector3 throughput{1.0f};
267269
openpgl::Vector3 contribution{0.0f};
@@ -310,7 +312,9 @@ struct PathSegmentDataStorage
310312
else
311313
{
312314
contribution += clampedThroughput * nextPathSegment.miWeight * directContribution;
315+
#ifdef OPENPGL_RADIANCE_CACHES
313316
misWeight = nextPathSegment.miWeight;
317+
#endif
314318
OPENPGL_ASSERT(embree::isvalid(contribution));
315319
OPENPGL_ASSERT(contribution[0] >= 0.f && contribution[1] >= 0.f && contribution[2] >= 0.f);
316320
}

openpgl/include/openpgl/common.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ struct pgl_spectrum
267267
uint32_t spectrum;
268268
#ifdef __cplusplus
269269
pgl_spectrum() {}
270-
pgl_spectrum(const float r, const float g, const float b) {
271-
spectrum = vec3f2rgbe({r,g,b});
270+
pgl_spectrum(const float r, const float g, const float b)
271+
{
272+
spectrum = vec3f2rgbe({r, g, b});
272273
}
273274
pgl_spectrum(const pgl_vec3f rgb)
274275
{

0 commit comments

Comments
 (0)