sdvx: add warning about Image Resize feature affecting Live2D performance (#502)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Turning on Image Resize feature completely tanks performance of Live2D
in some SDVX songs. Add a giant warning next to the UI.

On my system with RTX 4070, Sudden Death is normally a rock solid
120FPS, but drops to 30-40FPS when resizing is on.

* linear filter does not affect this at all
* window resize options also have no effect

It's really just rendering on a larger surface + calling `StretchRect`
that does this.

Additionally, hide the resolution swap option since it sees very low
usage & has potential gotchas likes this.
This commit is contained in:
bicarus
2026-01-06 16:40:54 -08:00
committed by GitHub
parent 8e23ef224a
commit ebf6382e7f
3 changed files with 32 additions and 3 deletions
+17
View File
@@ -1,9 +1,11 @@
#include "screen_resize.h" #include "screen_resize.h"
#include "avs/game.h"
#include "external/rapidjson/document.h" #include "external/rapidjson/document.h"
#include "external/rapidjson/pointer.h" #include "external/rapidjson/pointer.h"
#include "external/rapidjson/prettywriter.h" #include "external/rapidjson/prettywriter.h"
#include "misc/eamuse.h" #include "misc/eamuse.h"
#include "util/deferlog.h"
#include "util/utils.h" #include "util/utils.h"
#include "util/fileutils.h" #include "util/fileutils.h"
#include "hooks/graphics/graphics.h" #include "hooks/graphics/graphics.h"
@@ -78,6 +80,21 @@ namespace cfg {
root); root);
load_bool_value(doc, root + "enable_screen_resize", this->enable_screen_resize); load_bool_value(doc, root + "enable_screen_resize", this->enable_screen_resize);
if (this->enable_screen_resize) {
if (avs::game::is_model("KFC")) {
log_warning(
"ScreenResize",
"Image Resize feature enabled for SDVX; enabling this is known to significantly "
"lower framerate for songs with Live2D!");
deferredlogs::defer_error_messages({
"Image Resize + SDVX Live2D performance warning",
" Enabling Image Resize feature is known to have significant impact",
" on Live2D performance; you should disable it"});
} else {
log_misc("ScreenResize", "enabled by config file");
}
}
load_bool_value(doc, root + "enable_linear_filter", this->enable_linear_filter); load_bool_value(doc, root + "enable_linear_filter", this->enable_linear_filter);
for (size_t i = 0; i < std::size(this->scene_settings); i++) { for (size_t i = 0; i < std::size(this->scene_settings); i++) {
auto& scene = this->scene_settings[i]; auto& scene = this->scene_settings[i];
+4 -2
View File
@@ -242,14 +242,16 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
}, },
{ {
// FullscreenOrientationFlip // FullscreenOrientationFlip
.title = "Full Screen Orientation Swap", .title = "Full Screen Orientation Swap (EXPERIMENTAL)",
.name = "forceresswap", .name = "forceresswap",
.desc = .desc =
"Allows you to play portrait games in in landscape (and vice versa) by transposing resolution and applying image scaling.\n\n" "Allows you to play portrait games in in landscape (and vice versa) by transposing resolution and applying image scaling.\n\n"
"Works great for some games, but can COMPLETELY BREAK other games - YMMV!\n\n" "Works great for some games, but can COMPLETELY BREAK other games - YMMV!\n\n"
"Strongly consider combining this with -forceres option to render at monitor native resolution\n\n" "Strongly consider combining this with -forceres option to render at monitor native resolution\n\n"
"WARNING: for SDVX, this messes with camera angle for note lanes, causing it to be zoomed out!", "WARNING: for SDVX, this messes with camera angle for note lanes, causing it to be zoomed out, and causes performance issues "
"with Live2D!",
.type = OptionType::Bool, .type = OptionType::Bool,
.hidden = true,
.category = "Graphics (Full Screen)" .category = "Graphics (Full Screen)"
}, },
{ {
+11 -1
View File
@@ -100,6 +100,17 @@ namespace overlay::windows {
} }
void ScreenResize::build_fullscreen_config() { void ScreenResize::build_fullscreen_config() {
if (avs::game::is_model("KFC")) {
ImGui::TextColored(ImVec4(1, 0.5f, 0.5f, 1.f),
"Warning: Enabling Image Resize will significantly\n"
"lower framerate for songs with Live2D!");
} else {
ImGui::TextColored(ImVec4(1, 0.5f, 0.5f, 1.f),
"Warning: Some games are known to have significant\n"
"performance issues when Image Resize is enabled.");
}
// enable checkbox // enable checkbox
ImGui::Checkbox("Enable", &cfg::SCREENRESIZE->enable_screen_resize); ImGui::Checkbox("Enable", &cfg::SCREENRESIZE->enable_screen_resize);
ImGui::SameLine(); ImGui::SameLine();
@@ -176,7 +187,6 @@ namespace overlay::windows {
return; return;
} }
ImGui::TextUnformatted("Warning: may cause some games to crash.");
ImGui::BeginDisabled(graphics_window_change_crashes_game()); ImGui::BeginDisabled(graphics_window_change_crashes_game());
if (ImGui::Combo( if (ImGui::Combo(
"Window Style", "Window Style",