diff --git a/src/sceneGraph.cpp b/src/sceneGraph.cpp index 8aef64a..9e63394 100644 --- a/src/sceneGraph.cpp +++ b/src/sceneGraph.cpp @@ -61,7 +61,7 @@ void SceneNode::setTexture( } } void SceneNode::setMaterial(const Material& mat, bool recursive) { - reflexiveness = mat.reflexiveness; + if(mat.reflection_texture)reflexiveness = mat.reflexiveness; if (!mat.ignore_diffuse) diffuse_color = mat.diffuse_color; if (!mat.ignore_emissive) emissive_color = mat.emissive_color; if (!mat.ignore_specular) specular_color = mat.specular_color; diff --git a/src/utilities/material.cpp b/src/utilities/material.cpp index 33d3e92..524fcae 100644 --- a/src/utilities/material.cpp +++ b/src/utilities/material.cpp @@ -2,6 +2,7 @@ #include "material.hpp" #include "imageLoader.hpp" +// applies other on top of this, creating a new material Material Material::apply(const Material& other) const { Material out(*this); @@ -24,7 +25,6 @@ Material Material::apply(const Material& other) const { return out; } - Material Material::diffuse(glm::vec3 color) const { Material out(*this); out.diffuse_color = color;