From a6457599f9dc16455d26cb1e701a8651c98da488 Mon Sep 17 00:00:00 2001 From: "Tina H. (sheepytina)" <99330992+sheepytina@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:52:53 +1100 Subject: [PATCH] Clarify descriptions of Graphics Settings (#3881) * Rewrite tooltips: Internal Resolution, Anti-Aliasing. + Tweak others. * MSAA slider will display 1x as Off. * Rename setting and tweak tooltips: FPS (to Framerate) + Code style formatting. * Add tooltip: Texture Filtering. + Small tooltip changes. + Tidy up comments/newlines. * Add internal resolution advisory for Apple users. (Because this setting being missing keeps getting reported as a bug.) * Small text tweaks. * Code review suggestion Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com> * Missed one of the buttons + correct spelling of "frame rate" --------- Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com> --- soh/soh/SohMenuBar.cpp | 75 ++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index a10eb6201..bba1a902e 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -273,8 +273,10 @@ void DrawSettingsMenu() { 2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) { LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1)); } - UIWidgets::Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing"); - #endif + UIWidgets::Tooltip("Resolution scale. Multiplies output resolution by this value, on each axis relative to window size.\n" + "Lower values may improve performance.\n" + "Values above 100% can be used for super-sampling, as an intensive but highly effective form of anti-aliasing.\n\n" + "Default: 100%"); if (mAdvancedResolutionSettingsWindow) { ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 6.0f)); @@ -288,14 +290,28 @@ void DrawSettingsMenu() { ImGui::PopStyleColor(1); ImGui::PopStyleVar(3); } - - #ifndef __WIIU__ - if (UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true, false)) { - LUS::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1)); - }; - UIWidgets::Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel"); + #else + // macOS: Internal resolution is currently disabled in libultraship. + ImGui::BeginGroup(); + ImGui::Text("Internal Resolution: 100.0%%"); + UIWidgets::Spacer(0); + ImGui::Text(" " ICON_FA_INFO_CIRCLE " Not available on this system."); + UIWidgets::Spacer(0); + ImGui::EndGroup(); #endif + #ifndef __WIIU__ + if (UIWidgets::PaddedEnhancementSliderInt( + (CVarGetInteger("gMSAAValue", 1) == 1) ? "Anti-aliasing (MSAA): Off" : "Anti-aliasing (MSAA): %d", + "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true, false)) { + LUS::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1)); + } + UIWidgets::Tooltip("Activates MSAA (multi-sample anti-aliasing) from 2x up to 8x, to smooth the edges of rendered geometry.\n" + "Higher sample count will result in smoother edges on models, but may reduce performance.\n\n" + "Recommended: 2x or 4x"); + #endif + + UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f); { // FPS Slider const int minFps = 20; static int maxFps; @@ -369,26 +385,27 @@ void DrawSettingsMenu() { bool matchingRefreshRate = CVarGetInteger("gMatchRefreshRate", 0) && LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() != LUS::WindowBackend::DX11; UIWidgets::PaddedEnhancementSliderInt( - (currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", + (currentFps == 20) ? "Frame Rate: Original (20 fps)" : "Frame Rate: %d fps", "##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, true, false, matchingRefreshRate); #endif if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { UIWidgets::Tooltip( - "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely " - "visual and does not impact game logic, execution of glitches etc.\n\n" - "A higher target FPS than your monitor's refresh rate will waste resources, and might give a worse result." - ); + "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics.\n" + "This is purely visual and does not impact game logic, execution of glitches etc.\n" + "Higher frame rate settings may impact CPU performance." + "\n\n " ICON_FA_INFO_CIRCLE + " There is no need to set this above your monitor's refresh rate. Doing so will waste resources and may give a worse result."); } else { UIWidgets::Tooltip( - "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely " - "visual and does not impact game logic, execution of glitches etc." - ); + "Uses Matrix Interpolation to create extra frames, resulting in smoother graphics.\n" + "This is purely visual and does not impact game logic, execution of glitches etc.\n" + "Higher frame rate settings may impact CPU performance."); } } // END FPS Slider if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { UIWidgets::Spacer(0); - if (ImGui::Button("Match Refresh Rate")) { + if (ImGui::Button("Match Frame Rate to Refresh Rate")) { int hz = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(); if (hz >= 20 && hz <= 360) { CVarSetInteger("gInterpolationFPS", hz); @@ -396,17 +413,22 @@ void DrawSettingsMenu() { } } } else { - UIWidgets::PaddedEnhancementCheckbox("Match Refresh Rate", "gMatchRefreshRate", true, false); + UIWidgets::PaddedEnhancementCheckbox("Match Frame Rate to Refresh Rate", "gMatchRefreshRate", true, false); } - UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate"); + UIWidgets::Tooltip("Matches interpolation value to the game window's current refresh rate."); if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) { UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS", "##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false); - UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time."); + UIWidgets::Tooltip( + "(For DirectX backend only)\n\n" + "When Interpolation FPS (Frame Rate) setting is at least this threshold, add one frame of delay (e.g. 16.6 ms for 60 FPS) in order to avoid jitter." + "This setting allows the CPU to work on one frame while GPU works on the previous frame.\n" + "This setting should be used when your computer is too slow to do CPU + GPU work in time."); } UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f); + ImGui::Text("ImGui Menu Scale"); ImGui::SameLine(); ImGui::TextColored({ 0.85f, 0.35f, 0.0f, 1.0f }, "(Experimental)"); @@ -455,6 +477,7 @@ void DrawSettingsMenu() { if (LUS::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) { UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false); + UIWidgets::Tooltip("Activate vertical sync, to prevent screen tearing."); } if (LUS::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) { @@ -462,17 +485,21 @@ void DrawSettingsMenu() { } if (LUS::Context::GetInstance()->GetWindow()->GetGui()->SupportsViewports()) { - UIWidgets::PaddedEnhancementCheckbox("Allow multi-windows", "gEnableMultiViewports", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::PaddedEnhancementCheckbox("Allow multi-windows (Needs reload)", "gEnableMultiViewports", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip("Allows windows to be able to be dragged off of the main game window. Requires a reload to take effect."); } // If more filters are added to LUS, make sure to add them to the filters list here - ImGui::Text("Texture Filter (Needs reload)"); - + ImGui::Text("Texture Filtering (Needs reload)"); UIWidgets::EnhancementCombobox("gTextureFilter", filters, FILTER_THREE_POINT); + UIWidgets::Tooltip("Texture filtering, aka texture smoothing. Requires a reload to take effect.\n\n" + "Three-Point: Replicates real N64 texture filtering.\n" + "Bilinear: If Three-Point causes poor performance, try this.\n" + "Nearest: Disables texture smoothing. (Not recommended)"); - UIWidgets::Spacer(0); + UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f); + // Draw LUS settings menu (such as Overlays Text Font) LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings(); ImGui::EndMenu();