00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LUX_ERPT_H
00026 #define LUX_ERPT_H
00027
00028 #include "sampling.h"
00029 #include "paramset.h"
00030 #include "film.h"
00031
00032 namespace lux
00033 {
00034
00035 class ERPTSampler : public Sampler {
00036 public:
00037 ERPTSampler(int totMutations, float microProb, float rng,
00038 Sampler *sampler);
00039 virtual ~ERPTSampler();
00040
00041 virtual ERPTSampler* clone() const;
00042 virtual void GetBufferType(BufferType *type) {*type = BUF_TYPE_PER_SCREEN;}
00043 virtual u_int GetTotalSamplePos() { return baseSampler->GetTotalSamplePos(); }
00044 virtual int RoundSize(int size) const { return baseSampler->RoundSize(size); }
00045 virtual bool GetNextSample(Sample *sample, u_int *use_pos);
00046 virtual float *GetLazyValues(Sample *sample, u_int num, u_int pos);
00047
00048 virtual void AddSample(const Sample &sample);
00049 static Sampler *CreateSampler(const ParamSet ¶ms, const Film *film);
00050
00051 virtual bool IsMutating() { return true; }
00052
00053 int normalSamples, totalSamples, totalTimes, totalMutations;
00054 float pMicro, range;
00055 Sampler *baseSampler;
00056 float *baseImage, *sampleImage, *currentImage;
00057 int *baseTimeImage, *timeImage, *currentTimeImage, *offset;
00058 int numChains, chain, mutation, stamp, numMicro, posMicro;
00059 float baseLY, quantum, weight, LY, alpha;
00060 vector<Contribution> oldContributions, baseContributions;
00061 double totalLY, sampleCount;
00062 };
00063
00064 }
00065
00066 #endif // LUX_METROSAMPLER_H
00067