diff --git a/.hgignore b/.hgignore index ac75fa5b..0d6d76d8 100644 --- a/.hgignore +++ b/.hgignore @@ -27,6 +27,9 @@ ^data/windows/mitsuba_res.res$ ^dist/.*$ +# Debugging history files +^\.gdb_history$ + # Dependencies ^dependencies/.*$ diff --git a/src/subsurface/irrproc.cpp b/src/subsurface/irrproc.cpp index 6282e2bd..f08cf7cf 100644 --- a/src/subsurface/irrproc.cpp +++ b/src/subsurface/irrproc.cpp @@ -80,7 +80,7 @@ public: ref camera = m_scene->getCamera(); result->clear(); - for (size_t i=range->getRangeStart(); igetRangeEnd(); ++i) { + for (size_t i=range->getRangeStart(); i<=range->getRangeEnd(); ++i) { m_sampler->setSampleIndex(i); Point2 sample = m_sampler->next2D(); @@ -171,7 +171,7 @@ ParallelProcess::EStatus IrradianceSamplingProcess::generateWork(WorkUnit *unit, /* Reserve a sequence of at most 'granularity' samples */ size_t workSize = std::min(m_granularity, m_sampleCount - m_samplesRequested); RangeWorkUnit *range = static_cast(unit); - range->setRange(m_samplesRequested, m_samplesRequested + workSize); + range->setRange(m_samplesRequested, m_samplesRequested + workSize - 1); m_samplesRequested += workSize; return ESuccess;