Decouple Smooth Normals from Realistic View (#14724)

This commit is contained in:
Rodrigo Faselli
2026-07-12 13:30:55 -03:00
committed by GitHub
parent 3ae7bd04fa
commit b1e64dc69c
2 changed files with 12 additions and 11 deletions

View File

@@ -457,10 +457,9 @@ void GLModel::init_from(const indexed_triangle_set& its)
data.reserve_indices(3 * its.indices.size());
// Read user preference: smooth normals enabled
const bool realistic_mode = wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_MODE);
const bool smooth_normals_enabled = wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_PHONG_SMOOTH_NORMALS);
if (realistic_mode && smooth_normals_enabled) {
if (smooth_normals_enabled) {
// Use per-corner smooth normals (via IGL)
using MapMatrixXfUnaligned = Eigen::Map<const Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::DontAlign>>;
using MapMatrixXiUnaligned = Eigen::Map<const Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::DontAlign>>;