Feat: Better SMAA, make nearest the default filter and change the default store order (#2760)

* Add SMAA screen effect option

* Atualizar o smaa_frag.h

* Atualizar o smaa.frag

* Fix SMAA endpoint and crossing-edge area weights

* Atualizar o smaa.frag

* Fix SMAA diagonal edge blending

* Regenerate SMAA fragment shader header

* Fix SMAA diagonal fallback detection

* Add anti-aliasing translations

* Fix Korean anti-aliasing label

* Change default store tab order

* Put Nearest scaling before Linear

* Make Nearest the default scaling filter

* Improve SMAA diagonal blend weighting

* Improve SMAA diagonal detection and corner protection

* Reduce false positive SMAA diagonal blending

* test: update unknown upscaler fallback expectation
This commit is contained in:
LunaDL authored and GitHub committed 2026-11-18 00:26:32 -05:00
1 parent 8953eea9e0
commit d40c962b37
6 files changed
+429 -410

No files matched your search

@@ -306,6 +306,13 @@ object SessionPrefs {
prefs(context).edit().putStringSet("libraryFavorites", keys.toSet()).apply()
}
fun storesTabOrderCustomized(context: Context): Boolean =
prefs(context).getBoolean("storesTabOrderCustomized", false)
fun setStoresTabOrderCustomized(context: Context, customized: Boolean) {
prefs(context).edit().putBoolean("storesTabOrderCustomized", customized).apply()
}
fun storesTabOrder(context: Context): List<String> = idList(prefs(context).getString("storesTabOrder", null))
fun setStoresTabOrder(context: Context, order: List<String>) {
@@ -1530,7 +1537,7 @@ object SessionPrefs {
}
val upscalerChoices = listOf(
0 to "Linear", 2 to "Nearest", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
2 to "Nearest", 0 to "Linear", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
8 to "Snapdragon GSR (quality)", 7 to "NVIDIA NIS", 6 to "Sharpen only",
)
@@ -1545,12 +1552,12 @@ object SessionPrefs {
fun canonicalUpscaler(mode: Int): Int = when (mode) {
1 -> 0
5 -> 4
else -> mode.takeIf { m -> upscalerChoices.any { it.first == m } } ?: 0
else -> mode.takeIf { m -> upscalerChoices.any { it.first == m } } ?: 2
}
fun upscalerHasSharpness(mode: Int): Boolean = canonicalUpscaler(mode) in 3..8
fun upscaler(context: Context): Int = canonicalUpscaler(prefs(context).getInt("upscaler", 0))
fun upscaler(context: Context): Int = canonicalUpscaler(prefs(context).getInt("upscaler", 2))
fun setUpscaler(context: Context, mode: Int) {
prefs(context).edit().putInt("upscaler", canonicalUpscaler(mode)).apply()