elimina supersampling (shaders, pipeline, console command, config)

This commit is contained in:
2026-05-17 14:34:02 +02:00
parent 54d694a701
commit b852ec567d
11 changed files with 2 additions and 5035 deletions
-60
View File
@@ -55,65 +55,6 @@ static auto boolToggle(
// ── Command handlers ─────────────────────────────────────────────────────────
// SS [ON|OFF|SIZE|UPSCALE [NEAREST|LINEAR]|DOWNSCALE [BILINEAR|LANCZOS2|LANCZOS3]]
static auto cmdSs(const std::vector<std::string>& args) -> std::string { // NOLINT(readability-function-cognitive-complexity)
if (!Screen::get()->isHardwareAccelerated()) { return "No GPU acceleration"; }
static const std::array<std::string_view, 3> DOWNSCALE_NAMES = {"Bilinear", "Lanczos2", "Lanczos3"};
if (!args.empty() && args[0] == "SIZE") {
if (!Options::video.supersampling.enabled) { return "Supersampling is OFF: no texture"; }
const auto [w, h] = Screen::get()->getSsTextureSize();
if (w == 0) { return "SS texture: not active"; }
return "SS texture: " + std::to_string(w) + "x" + std::to_string(h);
}
if (!args.empty() && args[0] == "UPSCALE") {
if (args.size() == 1) {
Screen::get()->setLinearUpscale(!Options::video.supersampling.linear_upscale);
return std::string("Upscale: ") + (Options::video.supersampling.linear_upscale ? "Linear" : "Nearest");
}
if (args[1] == "NEAREST") {
if (!Options::video.supersampling.linear_upscale) { return "Upscale already Nearest"; }
Screen::get()->setLinearUpscale(false);
return "Upscale: Nearest";
}
if (args[1] == "LINEAR") {
if (Options::video.supersampling.linear_upscale) { return "Upscale already Linear"; }
Screen::get()->setLinearUpscale(true);
return "Upscale: Linear";
}
return "usage: ss upscale [nearest|linear]";
}
if (!args.empty() && args[0] == "DOWNSCALE") {
if (args.size() == 1) {
return std::string("Downscale: ") + std::string(DOWNSCALE_NAMES[static_cast<size_t>(Options::video.supersampling.downscale_algo)]);
}
int algo = -1;
if (args[1] == "BILINEAR") { algo = 0; }
if (args[1] == "LANCZOS2") { algo = 1; }
if (args[1] == "LANCZOS3") { algo = 2; }
if (algo == -1) { return "usage: ss downscale [bilinear|lanczos2|lanczos3]"; }
if (Options::video.supersampling.downscale_algo == algo) {
return std::string("Downscale already ") + std::string(DOWNSCALE_NAMES[static_cast<size_t>(algo)]);
}
Screen::get()->setDownscaleAlgo(algo);
return std::string("Downscale: ") + std::string(DOWNSCALE_NAMES[static_cast<size_t>(algo)]);
}
if (args.empty()) {
Screen::get()->toggleSupersampling();
return std::string("PostFX Supersampling ") + (Options::video.supersampling.enabled ? "ON" : "OFF");
}
if (args[0] == "ON") {
if (Options::video.supersampling.enabled) { return "Supersampling already ON"; }
Screen::get()->toggleSupersampling();
return "PostFX Supersampling ON";
}
if (args[0] == "OFF") {
if (!Options::video.supersampling.enabled) { return "Supersampling already OFF"; }
Screen::get()->toggleSupersampling();
return "PostFX Supersampling OFF";
}
return "usage: ss [on|off|size|upscale [nearest|linear]|downscale [bilinear|lanczos2|lanczos3]]";
}
// Helper: aplica un preset por dirección (NEXT/PREV) o nombre; devuelve mensaje
static auto applyPreset(const std::vector<std::string>& args) -> std::string {
const bool IS_CRTPI = Options::video.shader.current_shader == Rendering::ShaderType::CRTPI;
@@ -1013,7 +954,6 @@ static auto cmdConsole(const std::vector<std::string>& args) -> std::string { /
// ── CommandRegistry ──────────────────────────────────────────────────────────
void CommandRegistry::registerHandlers() { // NOLINT(readability-function-cognitive-complexity)
handlers_["cmd_ss"] = cmdSs;
handlers_["cmd_shader"] = cmdShader;
handlers_["cmd_border"] = cmdBorder;
handlers_["cmd_fullscreen"] = cmdFullscreen;