Пример #1
0
 vplIntegrator::vplIntegrator(const Parms& parms)
   : lightSampleID(-1), firstScatterSampleID(-1), firstScatterTypeSampleID(-1)
 {
   maxDepth        = parms.getInt  ("maxDepth"       ,10    );
   minContribution = parms.getFloat("minContribution",0.01f );
   epsilon         = parms.getFloat("epsilon"        ,32.0f)*float(ulp);
   backplate       = parms.getImage("backplate");
 }
 PathTraceIntegrator::PathTraceIntegrator(const Parms& parms)
   : lightSampleID(-1), firstScatterSampleID(-1), firstScatterTypeSampleID(-1), sampleLightForGlossy(false)
 {
   maxDepth        = parms.getInt  ("maxDepth"       ,10    );
   minContribution = parms.getFloat("minContribution",0.01f );
   epsilon         = parms.getFloat("epsilon"        ,32.0f)*float(ulp);
   backplate       = parms.getImage("backplate");
   sampleLightForGlossy = parms.getInt  ("sampleLightForGlossy",0);
 }
Пример #3
0
  lcRenderer::lcRenderer(const Parms& parms)
    : iteration(0)
  {
    /*! create integrator to use */
    std::string _integrator = parms.getString("integrator","lcintegrator");
    if (_integrator == "lcintegrator") integrator = new lcIntegrator(parms);
    else throw std::runtime_error("unknown integrator type: "+_integrator);

    /*! create sampler to use */
    std::string _samplers = parms.getString("sampler","multijittered");
    if (_samplers == "multijittered"   ) samplers = new SamplerFactory(parms);
    else throw std::runtime_error("unknown sampler type: "+_samplers);

    /*! create pixel filter to use */
    std::string _filter = parms.getString("filter","none");
    if      (_filter == "none"   ) filter = NULL;
    else if (_filter == "box"    ) filter = new BoxFilter;
    else if (_filter == "bspline") filter = new BSplineFilter;
    else throw std::runtime_error("unknown filter type: "+_filter);

    /*! get framebuffer configuration */
    gamma = parms.getFloat("gamma",1.0f);

    /*! show progress to the user */
    showProgress = parms.getInt("showprogress",0);
  }