Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
photon_map_light_transport.h File Reference
#include "Core/Renderer/PM/TPhoton.h"
#include "Core/Renderer/PM/TPhotonMap.h"
#include "Core/Renderer/PM/PMCommonParams.h"
#include "Core/LTA/SidednessAgreement.h"
#include "Core/LTA/RussianRoulette.h"
#include "Core/LTA/TDirectLightEstimator.h"
#include "Core/LTA/TIndirectLightEstimator.h"
#include "Core/SurfaceHit.h"
#include "Core/Intersection/Primitive.h"
#include "Core/Intersection/PrimitiveMetadata.h"
#include "Core/Emitter/Emitter.h"
#include "Core/SurfaceBehavior/SurfaceBehavior.h"
#include "Core/SurfaceBehavior/SurfaceOptics.h"
#include "Core/SurfaceBehavior/BsdfSampleQuery.h"
#include "Math/TVector3.h"
#include "Math/Color/Spectrum.h"
#include <Common/assertion.h>
#include <Common/primitive_type.h>
#include <cstddef>
#include <limits>
#include <algorithm>

Go to the source code of this file.

Namespaces

namespace  ph
 The root for all renderer implementations.
 

Functions

template<CPhoton Photon>
bool ph::accept_photon_by_surface_topology (const Photon &photon, const math::Vector3R &Ng, const math::Vector3R &Ns, const math::Vector3R &L, const math::Vector3R &V, const lta::SidednessAgreement &sidedness)
 
template<CPhoton Photon>
math::Spectrum ph::estimate_certainly_lost_energy (const std::size_t viewPathLength, const SurfaceHit &X, const math::Spectrum &viewPathThroughput, const TPhotonMapInfo< Photon > &photonMapInfo, const Scene *scene, const std::size_t minFullPathLength=1, const std::size_t maxFullPathLength=PMCommonParams::DEFAULT_MAX_PATH_LENGTH)
 Estimate the energy that can never be obtained by utilizing a photon map. The estimation is for the current hit point only. To account for lost energy along a path with multiple hit points, call this function for each hit point and sum the results.
 
template<CPhoton Photon>
math::Spectrum ph::estimate_lost_energy_for_extending (const std::size_t viewPathLength, const SurfaceHit &X, const math::Spectrum &viewPathThroughput, const TPhotonMapInfo< Photon > &photonMapInfo, const Scene *scene, const std::size_t minFullPathLength=1, const std::size_t maxFullPathLength=PMCommonParams::DEFAULT_MAX_PATH_LENGTH)
 Estimate the energy that is otherwise lost forever if the path is extended. The estimation is for the current hit point only. To account for lost energy along an extended path with multiple hit points, call this function for each hit point and sum the results. For a hit point, only one of estimate_lost_energy_for_extending() and estimate_lost_energy_for_merging() can be called.
 
template<CPhoton Photon>
math::Spectrum ph::estimate_lost_energy_for_merging (const std::size_t viewPathLength, const SurfaceHit &X, const math::Spectrum &viewPathThroughput, const TPhotonMapInfo< Photon > &photonMapInfo, const Scene *scene, const std::size_t minFullPathLength=1, const std::size_t maxFullPathLength=PMCommonParams::DEFAULT_MAX_PATH_LENGTH)
 Estimate the energy that is otherwise lost forever if the path is merged. The estimation is for the current hit point only and is expected to be called when the path ended (merged). For a hit point, only one of estimate_lost_energy_for_extending() and estimate_lost_energy_for_merging() can be called.