From df18331cfc15a1883d47f0e3943205da363d6ae7 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 20 Sep 2014 02:16:28 +0200 Subject: [PATCH] Complete fix for detail --- src/graphics/material.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index edb3bee81..107efdc1a 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -802,9 +802,11 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m } // Detail map : move it to slot 3 and add glossy to slot 2 + // Sometimes the material will be parsed twice, in this case we dont want to swap 1 and 2 again. if (mb && mb->getVertexType() == video::EVT_2TCOORDS) { - m->setTexture(2, m->getTexture(1)); + if (m->getTexture(1) != glossytex) + m->setTexture(2, m->getTexture(1)); if (!m->getTexture(2)) m->setTexture(2, getUnicolorTexture(SColor(255, 255, 255, 255))); }