Skip to content

Commit

Permalink
[cleanup] Final fixes for the release
Browse files Browse the repository at this point in the history
  • Loading branch information
sherholz-intel committed Sep 26, 2024
1 parent 062ea1f commit f4828a9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

- Radiance Caching (RC):
- 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
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. RC support can be enabled using the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ The full version history can be found [here](./CHANGELOG.md)

- Radiance Caching (RC):
- 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
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. RC support can be enabled using the
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog_latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- New (**Experimental**) Features:
- Radiance Caching (RC):
- 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.
- 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.
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.
- Guided/Adjoint-driven Russian Roulette (GRR):
- 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.
Expand Down
4 changes: 4 additions & 0 deletions openpgl/data/PathSegmentDataStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ struct PathSegmentDataStorage
}

bool directLightSample = false;
#ifdef OPENPGL_RADIANCE_CACHES
float misWeight = 1.f;
#endif
// evalaute the incident radiance the incident
openpgl::Vector3 throughput{1.0f};
openpgl::Vector3 contribution{0.0f};
Expand Down Expand Up @@ -310,7 +312,9 @@ struct PathSegmentDataStorage
else
{
contribution += clampedThroughput * nextPathSegment.miWeight * directContribution;
#ifdef OPENPGL_RADIANCE_CACHES
misWeight = nextPathSegment.miWeight;
#endif
OPENPGL_ASSERT(embree::isvalid(contribution));
OPENPGL_ASSERT(contribution[0] >= 0.f && contribution[1] >= 0.f && contribution[2] >= 0.f);
}
Expand Down
5 changes: 3 additions & 2 deletions openpgl/include/openpgl/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ struct pgl_spectrum
uint32_t spectrum;
#ifdef __cplusplus
pgl_spectrum() {}
pgl_spectrum(const float r, const float g, const float b) {
spectrum = vec3f2rgbe({r,g,b});
pgl_spectrum(const float r, const float g, const float b)
{
spectrum = vec3f2rgbe({r, g, b});
}
pgl_spectrum(const pgl_vec3f rgb)
{
Expand Down

0 comments on commit f4828a9

Please sign in to comment.