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 xStart, int xEnd, int yStart, int yEnd,
00038 int totMutations, float rng, int sw);
00039 ~ERPTSampler();
00040
00041 virtual ERPTSampler* clone() const;
00042 u_int GetTotalSamplePos() { return 0; }
00043 int RoundSize(int size) const { return size; }
00044 bool GetNextSample(Sample *sample, u_int *use_pos);
00045 float *GetLazyValues(Sample *sample, u_int num, u_int pos);
00046 void AddSample(float imageX, float imageY, const Sample &sample, const Ray &ray, const XYZColor &L, float alpha, int id=0);
00047 void AddSample(const Sample &sample);
00048 static Sampler *CreateSampler(const ParamSet ¶ms, const Film *film);
00049
00050 float LY, gain;
00051 int normalSamples, totalSamples, totalTimes, totalMutations, chain, numChains, mutation, consecRejects, stamp;
00052 float range, weight, alpha;
00053 float *baseImage, *sampleImage;
00054 int *timeImage, *offset;
00055 static int initCount, initSamples;
00056 static float meanIntensity;
00057 vector<Sample::Contribution> oldContributions;
00058 float *strataSamples;
00059 int strataWidth, strataSqr, currentStrata;
00060 };
00061
00062 }
00063
00064 #endif // LUX_METROSAMPLER_H
00065