diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 29551ac15..f3eec0080 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -122,6 +122,7 @@ void Bed3D::Axes::render() const glsafe(::glEnable(GL_DEPTH_TEST)); shader->start_using(); + shader->set_uniform("emission_factor", 0.0); // x axis std::array color = { 0.75f, 0.0f, 0.0f, 1.0f }; @@ -489,6 +490,7 @@ void Bed3D::render_model() const if (shader != nullptr) { shader->start_using(); shader->set_uniform("uniform_color", m_model_color); + shader->set_uniform("emission_factor", 0.0); ::glPushMatrix(); ::glTranslated(m_model_offset(0), m_model_offset(1), m_model_offset(2)); model->render(); diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 9139f4450..3949511f5 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -227,6 +227,7 @@ void GCodeViewer::SequentialView::Marker::render() const shader->start_using(); shader->set_uniform("uniform_color", m_color); + shader->set_uniform("emission_factor", 0.0); glsafe(::glPushMatrix()); glsafe(::glMultMatrixf(m_world_transform.data())); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 880e69bbd..baebbbf2d 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3918,7 +3918,7 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, bool glsafe(::glEnable(GL_DEPTH_TEST)); shader->start_using(); - shader->set_uniform("print_box.volume_detection", 0); + shader->set_uniform("emission_factor", 0.0); for (GLVolume* vol : visible_volumes) { shader->set_uniform("uniform_color", (vol->printable && !vol->is_outside) ? orange : gray); diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 4a632dca7..479b0fa77 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -1822,8 +1822,10 @@ void Selection::render_sidebar_position_hints(const std::string& sidebar_field) { auto set_color = [](Axis axis) { GLShaderProgram* shader = wxGetApp().get_current_shader(); - if (shader != nullptr) + if (shader != nullptr) { shader->set_uniform("uniform_color", AXES_COLOR[axis]); + shader->set_uniform("emission_factor", 0.0); + } }; if (boost::ends_with(sidebar_field, "x")) { @@ -1844,8 +1846,10 @@ void Selection::render_sidebar_rotation_hints(const std::string& sidebar_field) { auto set_color = [](Axis axis) { GLShaderProgram* shader = wxGetApp().get_current_shader(); - if (shader != nullptr) + if (shader != nullptr) { shader->set_uniform("uniform_color", AXES_COLOR[axis]); + shader->set_uniform("emission_factor", 0.0); + } }; auto render_sidebar_rotation_hint = [this]() { @@ -1874,8 +1878,10 @@ void Selection::render_sidebar_scale_hints(const std::string& sidebar_field) con auto render_sidebar_scale_hint = [this, uniform_scale](Axis axis) { GLShaderProgram* shader = wxGetApp().get_current_shader(); - if (shader != nullptr) + if (shader != nullptr) { shader->set_uniform("uniform_color", uniform_scale ? UNIFORM_SCALE_COLOR : AXES_COLOR[axis]); + shader->set_uniform("emission_factor", 0.0); + } glsafe(::glTranslated(0.0, 5.0, 0.0)); m_arrow.render();