@@ -275,7 +275,7 @@ HDRViewApp::HDRViewApp(std::optional<float> force_exposure, std::optional<float>
275
275
HelloImGui::DockableWindow advanced_settings_window;
276
276
advanced_settings_window.label = " Advanced settings" ;
277
277
advanced_settings_window.dockSpaceName = " RightSpace" ;
278
- advanced_settings_window.isVisible = true ;
278
+ advanced_settings_window.isVisible = false ;
279
279
advanced_settings_window.rememberIsVisible = true ;
280
280
advanced_settings_window.GuiFunction = [this ]
281
281
{
@@ -285,8 +285,8 @@ HDRViewApp::HDRViewApp(std::optional<float> force_exposure, std::optional<float>
285
285
ImGui::SameLine ();
286
286
ImGui::PushItemWidth (-5 * HelloImGui::EmSize ());
287
287
ImGui::BeginDisabled (!m_draw_clip_warnings);
288
- ImGui::DragFloatRange2 (" Clip warning" , &m_clip_range.min . x , &m_clip_range.max . x , 0 .01f , 0 .f , 0 .f ,
289
- " min: %.1f " , " max: %.1f" );
288
+ ImGui::DragFloatRange2 (" Clip warning" , &m_clip_range.x , &m_clip_range.y , 0 .01f , 0 .f , 0 .f , " min: %.1f " ,
289
+ " max: %.1f" );
290
290
ImGui::EndDisabled ();
291
291
ImGui::PopItemWidth ();
292
292
// ImGui::TreePop();
@@ -1073,6 +1073,8 @@ void HDRViewApp::load_settings()
1073
1073
m_dither = j.value <bool >(" dither" , m_dither);
1074
1074
g_file_list_mode = j.value <int >(" file list mode" , g_file_list_mode);
1075
1075
g_short_names = j.value <bool >(" short names" , g_short_names);
1076
+ m_draw_clip_warnings = j.value <bool >(" draw clip warnings" , m_draw_clip_warnings);
1077
+ m_clip_range = j.value <float2>(" clip range" , m_clip_range);
1076
1078
}
1077
1079
catch (json::exception &e)
1078
1080
{
@@ -1102,6 +1104,8 @@ void HDRViewApp::save_settings()
1102
1104
j[" verbosity" ] = spdlog::get_level ();
1103
1105
j[" file list mode" ] = g_file_list_mode;
1104
1106
j[" short names" ] = g_short_names;
1107
+ j[" draw clip warnings" ] = m_draw_clip_warnings;
1108
+ j[" clip range" ] = m_clip_range;
1105
1109
HelloImGui::SaveUserPref (" UserSettings" , j.dump (4 ));
1106
1110
}
1107
1111
@@ -2622,7 +2626,7 @@ void HDRViewApp::draw_image() const
2622
2626
2623
2627
m_shader->set_uniform (" time" , (float )ImGui::GetTime ());
2624
2628
m_shader->set_uniform (" draw_clip_warnings" , m_draw_clip_warnings);
2625
- m_shader->set_uniform (" clip_range" , float2{ m_clip_range. min . x , m_clip_range. max . x } );
2629
+ m_shader->set_uniform (" clip_range" , m_clip_range);
2626
2630
m_shader->set_uniform (" randomness" , randomness);
2627
2631
m_shader->set_uniform (" gain" , powf (2 .0f , m_exposure_live));
2628
2632
m_shader->set_uniform (" gamma" , m_gamma_live);
0 commit comments