ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.84k stars 189 forks source link

Make sharpness setting user-friendly #515

Open pchome opened 2 years ago

pchome commented 2 years ago

For example in the README Super + O : Decrease FSR sharpness by 1, but for FSR lower value mean more sharpening, while for NIS higher value mean more sharpening. Switching between upscalers via hotkey a bit confusing too, because of huge difference with same sharpness setting.

I experimented a little bit and created a sharpness mapping, e.g

// GamescopeUpscaler::BLIT (0 -> 20)
{     0,     1,     2,     3,     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,    19,   20 },
// GamescopeUpscaler::FSR  (>2.0f -> 0.0f)
{ 4.00f, 2.00f, 1.00f, 0.90f, 0.80f, 0.70f, 0.60f, 0.50f, 0.40f, 0.30f, 0.20f, 0.10f, 0.08f, 0.07f, 0.06f, 0.05f, 0.04f, 0.03f, 0.02f, 0.01f, 0.0f },
// GamescopeUpscaler::NIS  (0.0f -> 1.0f)
{ 0.00f, 0.05f, 0.10f, 0.15f, 0.20f, 0.25f, 0.30f, 0.35f, 0.40f, 0.45f, 0.50f, 0.55f, 0.60f, 0.65f, 0.70f, 0.75f, 0.80f, 0.85f, 0.90f, 0.95f, 1.0f },

those are random values, just to fit 0-20 range and default in the middle: 0.2 fo FSR and 0.5 for NIS (idk, I took default value from nvidia's builtin sharpener (50)).

I can do PR, but this is pretty much it.

pchome commented 2 years ago

Maybe it's only me or my hw/setup/dpi/etc. but defaults are too close to over-sharpening (as for me). Or maybe it's "marketing defaults", something like: "See? Sharpening! Now tune it for your needs." ? Anyway, my preference is 4 from "table" above, it's current --sharpness 8 for FSR and --sharpness 16 for NIS, iirc.

In addition, idk if it's a valid usage but out of curiosity I enabled __GL_SHARPEN_ENABLE=1 and __GL_SHARPEN_VALUE=20, here's result:

NIS

gamescope-tw-900-0 263-lod-1080-nis-0 2+0 2-sarp

FSR

gamescope-tw-900-0 263-lod-1080-fsr-0 8+0 2-sarp

command: gamescope -w 1600 -h 900 -W 1920 -H 1080 -Y -b --sharpness 4 -- q4wine-cli -p witcher1 -i witcher + there is modified libstrangle to add -0.263 lod bias (STRANGLE_PICMIP=-0.263).

EDIT: GPU usage higher with NIS in this setup (58-59%% vs 50-52%% for FSR), but screenshots are smaller :)

jakubbys commented 3 weeks ago

In my opinion the lowest fsr sharpness setting is a bit too high, nis is a bit of a lost cause with how oversharpened it is.
It's fine for dropping the resolution a little bit, but the further down we go, the more oversharpened.
UI elements during a race in NFS: Underground 2 and environment in the original Diablo 2.
Not sure how could I bring the fsr sharpness to 10(gamescope reported)/-5(steam deck ui).
Tried using windows+o/i like on Linux distros to bring it a bit down for a test.