diff --git a/QtMeshViewer/Header/OglViewerWidget.h b/QtMeshViewer/Header/OglViewerWidget.h index b6ccdb5..02e4a4a 100644 --- a/QtMeshViewer/Header/OglViewerWidget.h +++ b/QtMeshViewer/Header/OglViewerWidget.h @@ -39,7 +39,7 @@ private: struct { QVector3D position = { 1,1,1 }; - QVector3D intensities = { 1,1,1 }; + QVector3D intensities = { 1.0,1.0,1.0 }; float attenuationFactor = 0.2f; float ambientCoefficient = 0.005f; } m_light; diff --git a/QtMeshViewer/Source/OglViewerWidget.cpp b/QtMeshViewer/Source/OglViewerWidget.cpp index d74d5a9..bf46dad 100644 --- a/QtMeshViewer/Source/OglViewerWidget.cpp +++ b/QtMeshViewer/Source/OglViewerWidget.cpp @@ -336,7 +336,7 @@ void OglViewerWidget::toggleLight() if (m_lightOn) { - m_backgroundColor = { m_light.intensities.x() / 100, m_light.intensities.y() / 100, m_light.intensities.z() / 100, 1.0 }; + m_backgroundColor = { m_light.intensities.x() / 50, m_light.intensities.y() / 50, m_light.intensities.z() / 50, 1.0 }; updateLightPosition(); }