diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 862a2f3856..819392422e 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -89,6 +89,7 @@ std::vector> get_extruders_colors() } float FullyTransparentMaterialThreshold = 0.1f; float FullTransparentModdifiedToFixAlpha = 0.3f; +const float BlackThreshold = 0.2f; std::array adjust_color_for_rendering(const std::array &colors) { if (colors[3] < FullyTransparentMaterialThreshold) { // completely transparent @@ -99,11 +100,11 @@ std::array adjust_color_for_rendering(const std::array &colo new_color[3] = FullTransparentModdifiedToFixAlpha; return new_color; } - else if ((colors[0] < 0.1) && (colors[1] < 0.1) && (colors[2] < 0.1)) {//black filament deal + else if ((colors[0] < BlackThreshold) && (colors[1] < BlackThreshold) && (colors[2] < BlackThreshold)) { // black filament deal std::array new_color; - new_color[0] = 0.1; - new_color[1] = 0.1; - new_color[2] = 0.1; + new_color[0] = BlackThreshold; + new_color[1] = BlackThreshold; + new_color[2] = BlackThreshold; new_color[3] = colors[3]; return new_color; }