@@ -1115,12 +1115,6 @@ void Testbed::imgui() {
11151115 ImGui::SameLine ();
11161116 ImGui::Checkbox (" rand levels" , &m_max_level_rand_training);
11171117 if (m_testbed_mode == ETestbedMode::Nerf) {
1118- if (m_nerf.surface_rendering ) {
1119- ImGui::PushItemWidth (ImGui::GetWindowWidth () * 0 .2f );
1120- ImGui::SliderFloat (" Surface alpha thres" , &m_nerf.surface_rendering_threshold , 0 .0f , 1 .0f );
1121- ImGui::PopItemWidth ();
1122- }
1123-
11241118 ImGui::Checkbox (" envmap" , &m_nerf.training .train_envmap );
11251119 ImGui::SameLine ();
11261120 ImGui::Checkbox (" extrinsics" , &m_nerf.training .optimize_extrinsics );
@@ -1145,12 +1139,6 @@ void Testbed::imgui() {
11451139 ImGui::Checkbox (" as quaternions" , &export_extrinsics_in_quat_format);
11461140 ImGui::InputText (" File##Extrinsics file path" , m_imgui.extrinsics_path , sizeof (m_imgui.extrinsics_path ));
11471141 }
1148-
1149- ImGui::PushItemWidth (ImGui::GetWindowWidth () * 0 .3f );
1150- ImGui::Combo (" Train mode" , (int *)&m_nerf.training .train_mode , TrainModeStr);
1151- ImGui::PopItemWidth ();
1152- ImGui::SameLine ();
1153- ImGui::Checkbox (" Surface rendering" , &m_nerf.surface_rendering );
11541142 }
11551143
11561144 ImGui::PushItemWidth (ImGui::GetWindowWidth () * 0 .3f );
@@ -1205,6 +1193,7 @@ void Testbed::imgui() {
12051193 );
12061194
12071195 if (m_testbed_mode == ETestbedMode::Nerf && ImGui::TreeNode (" NeRF training options" )) {
1196+ ImGui::Combo (" Train mode" , (int *)&m_nerf.training .train_mode , TrainModeStr);
12081197 ImGui::Checkbox (" Random bg color" , &m_nerf.training .random_bg_color );
12091198 ImGui::SameLine ();
12101199 ImGui::Checkbox (" Snap to pixel centers" , &m_nerf.training .snap_to_pixel_centers );
@@ -1557,6 +1546,18 @@ void Testbed::imgui() {
15571546 }
15581547
15591548 if (m_testbed_mode == ETestbedMode::Nerf && ImGui::TreeNode (" NeRF rendering options" )) {
1549+ ImGui::Checkbox (" Surface rendering" , &m_nerf.surface_rendering );
1550+ if (!m_nerf.surface_rendering ) {
1551+ ImGui::BeginDisabled ();
1552+ }
1553+
1554+ ImGui::SameLine ();
1555+ ImGui::PushItemWidth (ImGui::GetWindowWidth () * 0 .2f );
1556+ ImGui::SliderFloat (" Surface alpha thres" , &m_nerf.surface_rendering_threshold , 0 .0f , 1 .0f );
1557+ ImGui::PopItemWidth ();
1558+
1559+ ImGui::EndDisabled ();
1560+
15601561 if (m_nerf.training .dataset .has_light_dirs ) {
15611562 vec3 light_dir = normalize (m_nerf.light_dir );
15621563 if (ImGui::TreeNodeEx (" Light Dir (Polar)" , ImGuiTreeNodeFlags_DefaultOpen)) {
0 commit comments