mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
Realistic View: Phong Shading + Ambient Oclusion + Cast Shadows (#13704)
* Phong Shading * Add shader selection to graphics preferences * SSAO * 3D canvas menu Co-Authored-By: yw4z <yw4z@outlook.com> * better SSAO * Adjust * phong in preview mode * cast shadows sombra 3 sombra 2 * fix 1 * SSAO independent * Fix 2 * clean 1 * shadows availables with gouraud * Update Preferences.cpp * tweeks * No Normal textures * Depth texture allocation * avoid rebinding/redefining state each render. * free SSAO * set shadow fill color * remove duplicated code * cached model to avoid per-frame uploads * yw4z suggestion Co-Authored-By: yw4z <yw4z@outlook.com> * Update Preferences.cpp Co-Authored-By: yw4z <yw4z@outlook.com> * Update GLCanvas3D.cpp * only gouraud for preview mode * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add new OpenGL shading model setting * Update src/slic3r/GUI/GLCanvas3D.cpp * Apply suggestion from @RF47 * Title Case * normal textures * gamma 2.2 Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com> * Revert "gamma 2.2" This reverts commit 909a84af604a080b3f4b8dd67d13956473a77afe. * Reapply "gamma 2.2" This reverts commit 0f0c3d9ec0d2c9647ce06afac4fe9266b5ffda97. * AO blend Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com> * Revert "AO blend" This reverts commit c5c9a3aa6b295704e71299451b937648e5c5f109. * 4.0 pixel radius * windows light effect direccion brillo * smoothing * ajuste de brillo * ajustes de brillo * No SSAO for bed * disable realistic view on paint gismos * Update ssao.fs * circular panel --------- Co-authored-by: yw4z <yw4z@outlook.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ian Bassi <ian.bassi@outlook.com> Co-authored-by: Ian Bassi <12130714+ianalexis@users.noreply.github.com> Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -1386,8 +1386,13 @@ bool GLGizmosManager::activate_gizmo(EType type)
|
||||
UndoRedo::SnapshotType::LeavingGizmoWithAction);
|
||||
}
|
||||
|
||||
if (type == Undefined) {
|
||||
if (type == Undefined) {
|
||||
// it is deactivation of gizmo
|
||||
if (m_restore_realistic_view_after_paint && wxGetApp().app_config != nullptr) {
|
||||
wxGetApp().app_config->set_bool(SETTING_OPENGL_REALISTIC_MODE, true);
|
||||
wxGetApp().app_config->save();
|
||||
m_restore_realistic_view_after_paint = false;
|
||||
}
|
||||
m_current = Undefined;
|
||||
return true;
|
||||
}
|
||||
@@ -1396,6 +1401,16 @@ bool GLGizmosManager::activate_gizmo(EType type)
|
||||
GLGizmoBase& new_gizmo = *m_gizmos[type];
|
||||
if (!new_gizmo.is_activable()) return false;
|
||||
|
||||
if (type == Seam || type == FdmSupports || type == FuzzySkin) {
|
||||
if (wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_MODE)) {
|
||||
m_restore_realistic_view_after_paint = true;
|
||||
wxGetApp().app_config->set_bool(SETTING_OPENGL_REALISTIC_MODE, false);
|
||||
wxGetApp().app_config->save();
|
||||
}
|
||||
} else {
|
||||
m_restore_realistic_view_after_paint = false;
|
||||
}
|
||||
|
||||
if (!m_serializing && new_gizmo.wants_enter_leave_snapshots())
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(),
|
||||
new_gizmo.get_gizmo_entering_text(),
|
||||
|
||||
@@ -150,6 +150,7 @@ private:
|
||||
static std::map<int, void*> icon_list;
|
||||
|
||||
bool m_is_dark = false;
|
||||
bool m_restore_realistic_view_after_paint = false;
|
||||
|
||||
/// <summary>
|
||||
/// Process mouse event on gizmo toolbar
|
||||
|
||||
Reference in New Issue
Block a user