Sharpening in the in-game menu, named for the upscaler in use

The slider was missing from the in-game menu entirely -- it only existed in
the settings screen. That is the wrong way round: the quick menu is where the
upscaler gets changed mid-game, and having to leave the game to tune what you
just switched to defeats the point of it being there.

Shown only for FSR and SGSR, since nearest and bilinear have nothing to
sharpen.

The label follows the selection in both places, because the number does not
mean the same thing to each: it is an RCAS stop to FSR and an edge factor to
SGSR, and a slider named for the upscaler that is not running is simply
wrong. One control rather than two, deliberately -- both upscalers want the
same thing from the user, and a second slider only lets them disagree.
This commit is contained in:
jpolo1224
2026-08-24 16:55:56 -04:00
parent 81346ebb8b
commit 03b5bde716
3 changed files with 29 additions and 1 deletions
@@ -1060,6 +1060,8 @@ val EN: Map<String, String> = mapOf(
"renderer.clearShaderCache.description" to "Wipes the compiled Vulkan + GL shader/pipeline caches. Use if a game renders corrupt after a driver swap or update — the next launch rebuilds them clean.",
"renderer.clearShaderCache.label" to "Clear Shader Cache",
"renderer.cas.sharpness.label" to "CAS Sharpness",
"renderer.cas.sharpness.fsr" to "FSR Sharpness",
"renderer.cas.sharpness.sgsr" to "SGSR Edge Sharpness",
"renderer.displayMode.description" to "How the PS3 picture fills your screen. Fit keeps the correct shape and adds bars where needed; Stretch fills the whole screen and distorts the image. The picture's shape itself is set by Console Aspect Ratio.",
"renderer.displayMode.label" to "Display Mode",
"renderer.loadTexturePacks.description" to "Loads replacement textures from the active game's texture folder.",
@@ -889,6 +889,24 @@ private fun GraphicsPane(state: EmulationMenuUiState, viewModel: EmulationMenuVi
selected = settings.casMode,
onSelect = { v -> viewModel.updateSettings { it.copy(casMode = v) } },
)
// Sharpening, shown only for the two upscalers that have any. It was missing from this
// menu entirely, which is the one people reach mid-game -- changing upscaler here and
// then having to leave the game to tune it defeats the point of the quick menu.
//
// The label follows the selection because the number does not mean the same thing to
// both: it is an RCAS stop to FSR and an edge factor to SGSR, and a slider named for the
// upscaler that is not running is simply wrong.
if (settings.casMode == 2 || settings.casMode == 3) {
Spacer(Modifier.height(6.dp))
com.armsx2.ui.settings.IntSliderRow(
label = str(if (settings.casMode == 3) "renderer.cas.sharpness.sgsr" else "renderer.cas.sharpness.fsr"),
value = settings.casSharpness.coerceIn(0, 100),
min = 0,
max = 100,
valueFormatter = { "$it%" },
onChange = { v -> viewModel.updateSettings { it.copy(casSharpness = v) } },
)
}
Spacer(Modifier.height(6.dp))
MenuSwitchRow(str("renderer.relaxedZcull.label"), settings.ps3.relaxedZcull) { v ->
viewModel.updateSettings { it.copy(ps3 = it.ps3.copy(relaxedZcull = v)) }
@@ -350,7 +350,15 @@ fun RendererTab(state: MutableState<Settings>) {
)
SettingsDivider()
IntSliderRow(
label = str("renderer.cas.sharpness.label"),
// Named for whichever upscaler is actually selected: the value is an RCAS stop to
// FSR and an edge factor to SGSR.
label = str(
when (s.casMode) {
2 -> "renderer.cas.sharpness.fsr"
3 -> "renderer.cas.sharpness.sgsr"
else -> "renderer.cas.sharpness.label"
}
),
value = s.casSharpness.coerceIn(0, 100),
min = 0,
max = 100,