From 965b04ca3988363b90ee440161e12a41bc34283b Mon Sep 17 00:00:00 2001 From: Miguel Angel Astor Romero Date: Tue, 17 Jan 2017 17:20:58 -0400 Subject: [PATCH] Added emissive color to material. --- material.hpp | 1 + path_tracer.cpp | 2 +- whitted_tracer.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/material.hpp b/material.hpp index 18a9d06..bf144b8 100644 --- a/material.hpp +++ b/material.hpp @@ -11,6 +11,7 @@ using glm::vec3; class Material { public: + vec3 m_emission; vec3 m_diffuse; vec3 m_specular; float m_rho; diff --git a/path_tracer.cpp b/path_tracer.cpp index 59afaad..a16c0dd 100644 --- a/path_tracer.cpp +++ b/path_tracer.cpp @@ -116,7 +116,7 @@ vec3 PathTracer::trace_ray(Ray & r, vector
& v_figures, vectorm_mat->m_emission + color; } else { if (e != NULL) diff --git a/whitted_tracer.cpp b/whitted_tracer.cpp index 957f29e..d3fae17 100644 --- a/whitted_tracer.cpp +++ b/whitted_tracer.cpp @@ -85,7 +85,7 @@ vec3 WhittedTracer::trace_ray(Ray & r, vector
& v_figures, vectorm_mat->m_emission + color; } else { if (e != NULL)