mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: render the opaque shell to the transparent shell
alpha channel is not need to update in shell Change-Id: I4ad3caa7d40f69ec799f1076cf617805ba1a240b (cherry picked from commit 315605926764121f6d0ccedf0e88a1ffc3aa0b46)
This commit is contained in:
@@ -1533,7 +1533,7 @@ void GLVolumeCollection::reset_outside_state()
|
||||
}
|
||||
}
|
||||
|
||||
void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* config)
|
||||
void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig *config, bool is_update_alpha)
|
||||
{
|
||||
static const float inv_255 = 1.0f / 255.0f;
|
||||
|
||||
@@ -1603,7 +1603,13 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* con
|
||||
const Color& color = colors[extruder_id];
|
||||
if (!color.text.empty()) {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
volume->color[i] = (float)color.rgba[i] * inv_255;
|
||||
if (is_update_alpha == false) {
|
||||
if (i < 3) {
|
||||
volume->color[i] = (float) color.rgba[i] * inv_255;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
volume->color[i] = (float) color.rgba[i] * inv_255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user