Subversion Repositories gelsvn

Rev

Rev 347 | Rev 355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 347 Rev 348
Line 37... Line 37...
37
static float dexposure = 0.f;
37
static float dexposure = 0.f;
38
 
38
 
39
Vec3uc tonemap(const Vec3f& v)
39
Vec3uc tonemap(const Vec3f& v)
40
{
40
{
41
    Vec3f u = v * std::pow(2.f, dexposure);
41
    Vec3f u = v * std::pow(2.f, dexposure);
42
    float r = random() - 0.5f;
42
    float r = mt_random() - 0.5f;
43
 
43
 
44
    Vec3uc I;
44
    Vec3uc I;
45
    for (int i=0; i<3; ++i)
45
    for (int i=0; i<3; ++i)
46
    {
46
    {
47
        float c = std::pow(u[i], 1.f / dgamma);
47
        float c = std::pow(u[i], 1.f / dgamma);
Line 265... Line 265...
265
 
265
 
266
    //build acceleration structure
266
    //build acceleration structure
267
    current->initialize(8, 25);
267
    current->initialize(8, 25);
268
 
268
 
269
    //create the renderer
269
    //create the renderer
270
    renderer = new path_tracer(width, height, true, 4);
270
    renderer = new path_tracer(width, height, true, 1);
271
    renderer->set_scene(current);
271
    renderer->set_scene(current);
272
 
272
 
273
    //create the film
273
    //create the film
274
    film = new Vec3f[width * height];
274
    film = new Vec3f[width * height];
275
    std::fill(film, film+width*height, Vec3f(0.3f));
275
    std::fill(film, film+width*height, Vec3f(0.3f));