#include "transport.h"
#include "scene.h"
Go to the source code of this file.
Functions | |
COREDLL Spectrum | UniformSampleAllLights (const Scene *scene, const Point &p, const Normal &n, const Vector &wo, BSDF *bsdf, const Sample *sample, int *lightSampleOffset, int *bsdfSampleOffset, int *bsdfComponentOffset) |
COREDLL Spectrum | UniformSampleOneLight (const Scene *scene, const Point &p, const Normal &n, const Vector &wo, BSDF *bsdf, const Sample *sample, int lightSampleOffset, int lightNumOffset, int bsdfSampleOffset, int bsdfComponentOffset) |
COREDLL Spectrum | WeightedSampleOneLight (const Scene *scene, const Point &p, const Normal &n, const Vector &wo, BSDF *bsdf, const Sample *sample, int lightSampleOffset, int lightNumOffset, int bsdfSampleOffset, int bsdfComponentOffset, float *&avgY, float *&avgYsample, float *&cdf, float &overallAvgY) |
Spectrum | EstimateDirect (const Scene *scene, const Light *light, const Point &p, const Normal &n, const Vector &wo, BSDF *bsdf, const Sample *sample, int lightSamp, int bsdfSamp, int bsdfComponent, u_int sampleNum) |
Spectrum EstimateDirect | ( | const Scene * | scene, | |
const Light * | light, | |||
const Point & | p, | |||
const Normal & | n, | |||
const Vector & | wo, | |||
BSDF * | bsdf, | |||
const Sample * | sample, | |||
int | lightSamp, | |||
int | bsdfSamp, | |||
int | bsdfComponent, | |||
u_int | sampleNum | |||
) |
Definition at line 123 of file transport.cpp.
References AbsDot(), Spectrum::Black(), BSDF_ALL, BSDF_SPECULAR, BSDF::f(), Primitive::GetAreaLight(), Scene::Intersect(), Light::IsDeltaLight(), Light::Le(), Intersection::Le(), Integrator::Li(), Sample::oneD, Light::Pdf(), BSDF::Pdf(), PowerHeuristic(), Intersection::primitive, RandomFloat(), BSDF::Sample_f(), Light::Sample_L(), Scene::Transmittance(), VisibilityTester::Transmittance(), Sample::twoD, and VisibilityTester::Unoccluded().
Referenced by UniformSampleAllLights(), UniformSampleOneLight(), and WeightedSampleOneLight().
COREDLL Spectrum UniformSampleAllLights | ( | const Scene * | scene, | |
const Point & | p, | |||
const Normal & | n, | |||
const Vector & | wo, | |||
BSDF * | bsdf, | |||
const Sample * | sample, | |||
int * | lightSampleOffset, | |||
int * | bsdfSampleOffset, | |||
int * | bsdfComponentOffset | |||
) |
Definition at line 31 of file transport.cpp.
References EstimateDirect(), Scene::lights, and Sample::n2D.
Referenced by PhotonIntegrator::Li(), IrradianceCache::Li(), IGIIntegrator::Li(), ExPhotonIntegrator::Li(), and DirectLighting::Li().
COREDLL Spectrum UniformSampleOneLight | ( | const Scene * | scene, | |
const Point & | p, | |||
const Normal & | n, | |||
const Vector & | wo, | |||
BSDF * | bsdf, | |||
const Sample * | sample, | |||
int | lightSampleOffset, | |||
int | lightNumOffset, | |||
int | bsdfSampleOffset, | |||
int | bsdfComponentOffset | |||
) |
Definition at line 51 of file transport.cpp.
References EstimateDirect(), Floor2Int(), Scene::lights, Sample::oneD, and RandomFloat().
Referenced by IrradianceCache::IndirectLo(), PathIntegrator::Li(), DirectLighting::Li(), BidirIntegrator::Li(), and WeightedSampleOneLight().
COREDLL Spectrum WeightedSampleOneLight | ( | const Scene * | scene, | |
const Point & | p, | |||
const Normal & | n, | |||
const Vector & | wo, | |||
BSDF * | bsdf, | |||
const Sample * | sample, | |||
int | lightSampleOffset, | |||
int | lightNumOffset, | |||
int | bsdfSampleOffset, | |||
int | bsdfComponentOffset, | |||
float *& | avgY, | |||
float *& | avgYsample, | |||
float *& | cdf, | |||
float & | overallAvgY | |||
) |
Definition at line 71 of file transport.cpp.
References ComputeStep1dCDF(), EstimateDirect(), ExponentialAverage(), Float2Int(), Scene::lights, Sample::oneD, SampleStep1d(), UniformSampleOneLight(), and Spectrum::y().
Referenced by DirectLighting::Li().