Separated Whitted from Path Tracing. Added FreeImage dependecy.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-11 13:45:17 -04:00
parent ea7529f995
commit a9670e93f0
9 changed files with 154 additions and 33 deletions

View File

@@ -57,8 +57,8 @@ vec3 PathTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *
dir_spec_color += vis ? v_lights[l]->specular(n, r, t, _f->m_mat) : vec3(0.0f);
}
// If enabled, calculate indirect lighting contribution.
if (indirect_l && rec_level < MAX_RECURSION) {
// Calculate indirect lighting contribution.
if (rec_level < MAX_RECURSION) {
r1 = random01();
r2 = random01();
sample = sample_hemisphere(r1, r2);