#include <metropolis.h>
Public Member Functions | |
MetropolisRenderer (int perPixelSamples, int nBootstrap, int directPixelSamples, float largeStepProbability, bool doDirectSeparately, int maxConsecutiveRejects, int maxDepth, Camera *camera, bool doBidirectional) | |
~MetropolisRenderer () | |
void | Render (const Scene *scene) |
Spectrum | Li (const Scene *scene, const RayDifferential &ray, const Sample *sample, RNG &rng, MemoryArena &arena, Intersection *isect=NULL, Spectrum *T=NULL) const |
Spectrum | Transmittance (const Scene *scene, const RayDifferential &ray, const Sample *sample, RNG &rng, MemoryArena &arena) const |
Private Member Functions | |
Spectrum | PathL (const MLTSample &sample, const Scene *scene, MemoryArena &arena, const Camera *camera, const Distribution1D *lightDistribution, PathVertex *cameraPath, PathVertex *lightPath, RNG &rng) const |
Spectrum | Lpath (const Scene *scene, const PathVertex *path, int pathLength, MemoryArena &arena, const vector< LightingSample > &samples, RNG &rng, float time, const Distribution1D *lightDistribution, const RayDifferential &escapedRay, const Spectrum &escapedAlpha) const |
Spectrum | Lbidir (const Scene *scene, const PathVertex *cameraPath, int cameraPathLength, const PathVertex *lightPath, int lightPathLength, MemoryArena &arena, const vector< LightingSample > &samples, RNG &rng, float time, const Distribution1D *lightDistribution, const RayDifferential &escapedRay, const Spectrum &escapedAlpha) const |
Private Attributes | |
Camera * | camera |
bool | bidirectional |
uint32_t | nDirectPixelSamples |
uint32_t | nPixelSamples |
uint32_t | maxDepth |
uint32_t | largeStepsPerPixel |
uint32_t | nBootstrap |
uint32_t | maxConsecutiveRejects |
DirectLightingIntegrator * | directLighting |
AtomicInt32 | nTasksFinished |
Friends | |
class | MLTTask |
Definition at line 42 of file metropolis.h.
MetropolisRenderer::MetropolisRenderer | ( | int | perPixelSamples, | |
int | nBootstrap, | |||
int | directPixelSamples, | |||
float | largeStepProbability, | |||
bool | doDirectSeparately, | |||
int | maxConsecutiveRejects, | |||
int | maxDepth, | |||
Camera * | camera, | |||
bool | doBidirectional | |||
) |
Definition at line 470 of file metropolis.cpp.
References Assert, bidirectional, camera, directLighting, largeStepsPerPixel, maxConsecutiveRejects, maxDepth, nBootstrap, nDirectPixelSamples, nPixelSamples, nTasksFinished, RoundUpPow2(), SAMPLE_ALL_UNIFORM, and Warning().
MetropolisRenderer::~MetropolisRenderer | ( | ) |
Definition at line 498 of file metropolis.cpp.
References camera, and directLighting.
Spectrum MetropolisRenderer::Lbidir | ( | const Scene * | scene, | |
const PathVertex * | cameraPath, | |||
int | cameraPathLength, | |||
const PathVertex * | lightPath, | |||
int | lightPathLength, | |||
MemoryArena & | arena, | |||
const vector< LightingSample > & | samples, | |||
RNG & | rng, | |||
float | time, | |||
const Distribution1D * | lightDistribution, | |||
const RayDifferential & | escapedRay, | |||
const Spectrum & | escapedAlpha | |||
) | const [private] |
Definition at line 387 of file metropolis.cpp.
References AbsDot(), ALLOCA, PathVertex::alpha, PathVertex::bsdf, BSDF_ALL, BSDF_SPECULAR, LightingSample::bsdfSample, BSDF::dgShading, directLighting, DistanceSquared(), EstimateDirect(), BSDF::f(), Scene::IntersectP(), CoefficientSpectrum< nSamples >::IsBlack(), PathVertex::isect, Intersection::Le(), LightingSample::lightNum, Scene::lights, LightingSample::lightSample, DifferentialGeometry::nn, Normalize(), PathVertex::nSpecularComponents, DifferentialGeometry::p, Intersection::rayEpsilon, Distribution1D::SampleDiscrete(), PathVertex::specularBounce, and PathVertex::wPrev.
Referenced by PathL().
Spectrum MetropolisRenderer::Li | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
RNG & | rng, | |||
MemoryArena & | arena, | |||
Intersection * | isect = NULL , |
|||
Spectrum * | T = NULL | |||
) | const [virtual] |
Implements Renderer.
Definition at line 777 of file metropolis.cpp.
References directLighting, Scene::Intersect(), DirectLightingIntegrator::Li(), and Scene::lights.
Spectrum MetropolisRenderer::Lpath | ( | const Scene * | scene, | |
const PathVertex * | path, | |||
int | pathLength, | |||
MemoryArena & | arena, | |||
const vector< LightingSample > & | samples, | |||
RNG & | rng, | |||
float | time, | |||
const Distribution1D * | lightDistribution, | |||
const RayDifferential & | escapedRay, | |||
const Spectrum & | escapedAlpha | |||
) | const [private] |
Definition at line 337 of file metropolis.cpp.
References PathVertex::alpha, PathVertex::bsdf, BSDF_ALL, BSDF_SPECULAR, LightingSample::bsdfSample, BSDF::dgShading, directLighting, EstimateDirect(), CoefficientSpectrum< nSamples >::IsBlack(), PathVertex::isect, Intersection::Le(), LightingSample::lightNum, Scene::lights, LightingSample::lightSample, DifferentialGeometry::nn, DifferentialGeometry::p, Intersection::rayEpsilon, Distribution1D::SampleDiscrete(), PathVertex::specularBounce, and PathVertex::wPrev.
Referenced by PathL().
Spectrum MetropolisRenderer::PathL | ( | const MLTSample & | sample, | |
const Scene * | scene, | |||
MemoryArena & | arena, | |||
const Camera * | camera, | |||
const Distribution1D * | lightDistribution, | |||
PathVertex * | cameraPath, | |||
PathVertex * | lightPath, | |||
RNG & | rng | |||
) | const [private] |
Definition at line 278 of file metropolis.cpp.
References AbsDot(), bidirectional, MLTSample::cameraPathSamples, MLTSample::cameraSample, Ray::d, GeneratePath(), Camera::GenerateRayDifferential(), CoefficientSpectrum< nSamples >::IsBlack(), Lbidir(), MLTSample::lightingSamples, MLTSample::lightNumSample, MLTSample::lightPathSamples, MLTSample::lightRaySamples, Scene::lights, Lpath(), Normalize(), nPixelSamples, Light::Sample_L(), Distribution1D::SampleDiscrete(), RayDifferential::ScaleDifferentials(), and CameraSample::time.
Referenced by Render(), and MLTTask::Run().
void MetropolisRenderer::Render | ( | const Scene * | scene | ) | [virtual] |
Implements Renderer.
Definition at line 527 of file metropolis.cpp.
References arena, Assert, bidirectional, camera, ComputeLightSamplingCDF(), Mutex::Create(), Mutex::Destroy(), directLighting, ProgressReporter::Done(), EnqueueTasks(), Camera::film, MemoryArena::FreeAll(), Film::GetPixelExtent(), I(), Info(), IsPowerOf2(), LargeStep(), largeStepsPerPixel, Lerp(), Scene::lights, maxDepth, MLTTask, nBootstrap, nDirectPixelSamples, nPixelSamples, NumSystemCores(), PathL(), RNG::RandomFloat(), RNG::RandomUInt(), rng, RoundUpPow2(), Sample02(), RNG::Seed(), Camera::shutterClose, Camera::shutterOpen, WaitForAllTasks(), Film::WriteImage(), Film::xResolution, and Film::yResolution.
Spectrum MetropolisRenderer::Transmittance | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
RNG & | rng, | |||
MemoryArena & | arena | |||
) | const [virtual] |
Implements Renderer.
Definition at line 797 of file metropolis.cpp.
friend class MLTTask [friend] |
Definition at line 80 of file metropolis.h.
Referenced by Render().
bool MetropolisRenderer::bidirectional [private] |
Definition at line 75 of file metropolis.h.
Referenced by MetropolisRenderer(), PathL(), Render(), and MLTTask::Run().
Camera* MetropolisRenderer::camera [private] |
Definition at line 74 of file metropolis.h.
Referenced by MetropolisRenderer(), Render(), and ~MetropolisRenderer().
Definition at line 78 of file metropolis.h.
Referenced by Lbidir(), Li(), Lpath(), MetropolisRenderer(), Render(), and ~MetropolisRenderer().
uint32_t MetropolisRenderer::largeStepsPerPixel [private] |
Definition at line 77 of file metropolis.h.
Referenced by MetropolisRenderer(), Render(), and MLTTask::Run().
uint32_t MetropolisRenderer::maxConsecutiveRejects [private] |
Definition at line 77 of file metropolis.h.
Referenced by MetropolisRenderer(), and MLTTask::Run().
uint32_t MetropolisRenderer::maxDepth [private] |
Definition at line 76 of file metropolis.h.
Referenced by MetropolisRenderer(), Render(), and MLTTask::Run().
uint32_t MetropolisRenderer::nBootstrap [private] |
Definition at line 77 of file metropolis.h.
Referenced by MetropolisRenderer(), and Render().
uint32_t MetropolisRenderer::nDirectPixelSamples [private] |
Definition at line 76 of file metropolis.h.
Referenced by MetropolisRenderer(), and Render().
uint32_t MetropolisRenderer::nPixelSamples [private] |
Definition at line 76 of file metropolis.h.
Referenced by MetropolisRenderer(), PathL(), Render(), and MLTTask::Run().
Definition at line 79 of file metropolis.h.
Referenced by MetropolisRenderer(), and MLTTask::Run().