Added emissive color to material.
This commit is contained in:
@@ -11,6 +11,7 @@ using glm::vec3;
|
||||
|
||||
class Material {
|
||||
public:
|
||||
vec3 m_emission;
|
||||
vec3 m_diffuse;
|
||||
vec3 m_specular;
|
||||
float m_rho;
|
||||
|
@@ -116,7 +116,7 @@ vec3 PathTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *
|
||||
}
|
||||
|
||||
// Return final color.
|
||||
return color;
|
||||
return _f->m_mat->m_emission + color;
|
||||
|
||||
} else {
|
||||
if (e != NULL)
|
||||
|
@@ -85,7 +85,7 @@ vec3 WhittedTracer::trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Ligh
|
||||
}
|
||||
|
||||
// Return final color.
|
||||
return color;
|
||||
return _f->m_mat->m_emission + color;
|
||||
|
||||
} else {
|
||||
if (e != NULL)
|
||||
|
Reference in New Issue
Block a user