Fix: Correct color of bed plates without 3D model (#9320)

fix color
This commit is contained in:
yw4z 2025-04-13 08:35:23 +03:00 committed by GitHub
parent 5f16371672
commit 4b33c31106
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -729,7 +729,9 @@ void Bed3D::render_default(bool bottom, const Transform3d& view_matrix, const Tr
if (m_model.get_filename().empty() && !bottom) { if (m_model.get_filename().empty() && !bottom) {
// draw background // draw background
glsafe(::glDepthMask(GL_FALSE)); glsafe(::glDepthMask(GL_FALSE));
m_triangles.set_color(DEFAULT_MODEL_COLOR); ColorRGBA color = m_is_dark ? DEFAULT_MODEL_COLOR_DARK : DEFAULT_MODEL_COLOR; // ORCA add dark mode support
color = ColorRGBA(color[0] * 0.8f, color[1] * 0.8f,color[2] * 0.8f, color[3]); // ORCA shift color a darker tone to fix difference between flat / gouraud_light shader
m_triangles.set_color(color);
m_triangles.render(); m_triangles.render();
glsafe(::glDepthMask(GL_TRUE)); glsafe(::glDepthMask(GL_TRUE));
} }