diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index 5d98f3fe8..5a8e1222f 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -917,6 +917,9 @@ void GenericCAO::setNodeLight(const video::SColor &light_color) return; setColorParam(node, light_color); } else { + // TODO refactor vertex colors to be separate from the other vertex attributes + // instead of mutating meshes / buffers for everyone via setMeshColor. + // (Note: There are a couple more places here where setMeshColor is used.) if (m_meshnode) { setMeshColor(m_meshnode->getMesh(), light_color); } else if (m_animated_meshnode) { diff --git a/src/gui/guiScene.cpp b/src/gui/guiScene.cpp index a41cf0782..f30c4f3d1 100644 --- a/src/gui/guiScene.cpp +++ b/src/gui/guiScene.cpp @@ -9,6 +9,8 @@ #include #include "IAttributes.h" #include "porting.h" +#include "client/mesh.h" +#include "settings.h" GUIScene::GUIScene(gui::IGUIEnvironment *env, scene::ISceneManager *smgr, gui::IGUIElement *parent, core::recti rect, s32 id) @@ -96,6 +98,11 @@ void GUIScene::draw() if (m_inf_rot) rotateCamera(v3f(0.f, -0.03f * (float)dtime_ms, 0.f)); + // HACK restore mesh vertex colors to full brightness: + // They may have been mutated in entity rendering code before. + if (!g_settings->getBool("enable_shaders")) + setMeshColor(m_mesh->getMesh(), irr::video::SColor(0xFFFFFFFF)); + m_smgr->drawAll(); if (m_initial_rotation && m_mesh) {