mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 19:02:19 -05:00
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>
This commit is contained in:
parent
351a511dc7
commit
a6457599f9
@ -273,8 +273,10 @@ void DrawSettingsMenu() {
|
|||||||
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
||||||
LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1));
|
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");
|
UIWidgets::Tooltip("Resolution scale. Multiplies output resolution by this value, on each axis relative to window size.\n"
|
||||||
#endif
|
"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) {
|
if (mAdvancedResolutionSettingsWindow) {
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 6.0f));
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 6.0f));
|
||||||
@ -288,14 +290,28 @@ void DrawSettingsMenu() {
|
|||||||
ImGui::PopStyleColor(1);
|
ImGui::PopStyleColor(1);
|
||||||
ImGui::PopStyleVar(3);
|
ImGui::PopStyleVar(3);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
#ifndef __WIIU__
|
// macOS: Internal resolution is currently disabled in libultraship.
|
||||||
if (UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true, false)) {
|
ImGui::BeginGroup();
|
||||||
LUS::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1));
|
ImGui::Text("Internal Resolution: 100.0%%");
|
||||||
};
|
UIWidgets::Spacer(0);
|
||||||
UIWidgets::Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel");
|
ImGui::Text(" " ICON_FA_INFO_CIRCLE " Not available on this system.");
|
||||||
|
UIWidgets::Spacer(0);
|
||||||
|
ImGui::EndGroup();
|
||||||
#endif
|
#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
|
{ // FPS Slider
|
||||||
const int minFps = 20;
|
const int minFps = 20;
|
||||||
static int maxFps;
|
static int maxFps;
|
||||||
@ -369,26 +385,27 @@ void DrawSettingsMenu() {
|
|||||||
bool matchingRefreshRate =
|
bool matchingRefreshRate =
|
||||||
CVarGetInteger("gMatchRefreshRate", 0) && LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() != LUS::WindowBackend::DX11;
|
CVarGetInteger("gMatchRefreshRate", 0) && LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() != LUS::WindowBackend::DX11;
|
||||||
UIWidgets::PaddedEnhancementSliderInt(
|
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);
|
"##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, true, false, matchingRefreshRate);
|
||||||
#endif
|
#endif
|
||||||
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely "
|
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics.\n"
|
||||||
"visual and does not impact game logic, execution of glitches etc.\n\n"
|
"This is purely visual and does not impact game logic, execution of glitches etc.\n"
|
||||||
"A higher target FPS than your monitor's refresh rate will waste resources, and might give a worse result."
|
"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 {
|
} else {
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely "
|
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics.\n"
|
||||||
"visual and does not impact game logic, execution of glitches etc."
|
"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
|
} // END FPS Slider
|
||||||
|
|
||||||
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
||||||
UIWidgets::Spacer(0);
|
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();
|
int hz = LUS::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||||
if (hz >= 20 && hz <= 360) {
|
if (hz >= 20 && hz <= 360) {
|
||||||
CVarSetInteger("gInterpolationFPS", hz);
|
CVarSetInteger("gInterpolationFPS", hz);
|
||||||
@ -396,17 +413,22 @@ void DrawSettingsMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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) {
|
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
||||||
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
|
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
|
||||||
"##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false);
|
"##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);
|
UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);
|
||||||
|
|
||||||
ImGui::Text("ImGui Menu Scale");
|
ImGui::Text("ImGui Menu Scale");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextColored({ 0.85f, 0.35f, 0.0f, 1.0f }, "(Experimental)");
|
ImGui::TextColored({ 0.85f, 0.35f, 0.0f, 1.0f }, "(Experimental)");
|
||||||
@ -455,6 +477,7 @@ void DrawSettingsMenu() {
|
|||||||
|
|
||||||
if (LUS::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) {
|
if (LUS::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) {
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false);
|
||||||
|
UIWidgets::Tooltip("Activate vertical sync, to prevent screen tearing.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LUS::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) {
|
if (LUS::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) {
|
||||||
@ -462,17 +485,21 @@ void DrawSettingsMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (LUS::Context::GetInstance()->GetWindow()->GetGui()->SupportsViewports()) {
|
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.");
|
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
|
// 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::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();
|
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings();
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user