Minor changes.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-11 14:54:46 -04:00
parent f150f8f24c
commit a6821c429d
5 changed files with 6 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ vec3 WhittedTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Ligh
n = _f->normal_at_int(r, t);
// Check if the material is not reflective/refractive.
if( !_f->m_mat.m_refract) {
if (!_f->m_mat.m_refract) {
// Calculate the direct lighting.
for (size_t l = 0; l < v_lights.size(); l++) {
// For every light source
@@ -55,7 +55,7 @@ vec3 WhittedTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Ligh
dir_spec_color += vis ? v_lights[l]->specular(n, r, i_pos, _f->m_mat) : vec3(0.0f);
}
color += (dir_diff_color * (_f->m_mat.m_diffuse / pi<float>())) + dir_spec_color;
color += (dir_diff_color * (_f->m_mat.m_diffuse / pi<float>())) + (_f->m_mat.m_diffuse * dir_spec_color);
// Determine the specular reflection color.
if (_f->m_mat.m_rho > 0.0f && rec_level < MAX_RECURSION) {