Lossless Scaling

Lossless Scaling

FacePwn64 Jul 4, 2024 @ 12:06pm
How does LSFG work perfectly with ReShade and Nvidia Freestyle but not other overlays?
I'm trying to piece together how this works. If I use the aforementioned shader overlay programs, it doesn't ruin the frame pacing of LSFG. But if a notification pops up from Windows, Steam, Ubisoft Connect, etc. or I use a crosshair overlay app (YoloX in general, Crosshair X crosshairs when showing animations, even in Game Bar mode), LSFG completely messes up and starts thinking a game is running at my full monitor refresh rate. Even setting YoloX to the same framerate cap as the game seems to raise the FPS that LSFG thinks the game is running at (according to the LS framerate counter, but not in-game or Steam/Ubisoft Connect framerate counters), though not all the way to my full monitor refresh rate.

My best guess is that LSFG is reading frames from both a game and any overlays on it as adding to the total framerate counter, and even if an overlay (crosshair app) is frame-limited alongside a game, the desync between game and overlay frames still counts towards the framerate total. In which case, why do shader overlays work perfectly? Are they somehow perfectly synchronized to the game framerates, or at least closely enough that LSFG doesn't count any extra frames? Is there some "layer" of overlays that LSFG can look underneath?
Last edited by FacePwn64; Jul 4, 2024 @ 12:15pm
< >
Showing 1-8 of 8 comments
Spook Jul 4, 2024 @ 1:28pm 
I believe this is because Reshade hooks into a game's graphics API. One obvious reason why crosshair-software would not do this is ban-safety. It's not entirely unlikely that LS thinks the currently interfering overlay is "your game", and starts acting on it instead. I assume LS works on the focused/top-most graphics plane. And that would necessarily be any overlay that pops up, or your crosshair software. Otherwise you wouldn't be able to see it over your game.

Just my interpretation, i don't know to much about the intricacies of LS's workings.

Link to a custom crosshair that works through Reshade.
https://github.com/notpeelz/reshade-xhair
I suggest you don't try and find out whether or not Reshade can get you banned when using it in multiplayer games. As it hooks into your game's graphics API, it probably will.
Last edited by Spook; Jul 4, 2024 @ 1:29pm
FacePwn64 Jul 4, 2024 @ 2:09pm 
That makes sense, thanks. ReShade and such are overlays, but hook in and are sent out as the game's frames rather than its own? And none of the options in LS hook into the game's graphics API, right? Working on the top-most layer would also explain why Windows notifications and Game Bar also trigger this issue, even if they're not exactly the same kinds of overlay.
Spook Jul 4, 2024 @ 2:18pm 
Originally posted by FacePwn64:
That makes sense, thanks. ReShade and such are overlays, but hook in and are sent out as the game's frames rather than its own?
I believe so, yes. Apart from Reshade being an overlay. As i understand it it's a post-processing step, like a game's FXAA or bloom would be.

And none of the options in LS hook into the game's graphics API, right?
Nope, would make LS multiplayer-unsafe, and is simply not neccesary for it to function. I believe LS can at most change the size of your game's window.

Working on the top-most layer would also explain why Windows notifications and Game Bar also trigger this issue, even if they're not exactly the same kinds of overlay.
I believe so, it makes sense. Though i don't know this for a fact. If anyone reading this does, i'd be interested in knowing.
Last edited by Spook; Jul 4, 2024 @ 2:18pm
Ser_Chonks Jul 4, 2024 @ 2:25pm 
Reshade integration is much deeper into the API, with the REST addons you can even move game shaders around and reach under UI/bloom/fog/lighting, etc.

It would be amazing if a modder made an addon crossing over Reshade and LS so we could skip UI, possibly with two Reshade instances, one inside the game and one inside LS sharing resources.
Spook Jul 4, 2024 @ 2:27pm 
Originally posted by Ser_Chonks:
Reshade integration is much deeper into the API, with the REST addons you can even move game shaders around and reach under UI/bloom/fog/lighting, etc.
Fascinating, i was unaware. Thank you.
Ser_Chonks Jul 4, 2024 @ 2:41pm 
Originally posted by Spook:
Originally posted by Ser_Chonks:
Reshade integration is much deeper into the API, with the REST addons you can even move game shaders around and reach under UI/bloom/fog/lighting, etc.
Fascinating, i was unaware. Thank you.
YW ^^

Just be aware not all games handle shader reordering well though, you may occasionally get a crash when trying to move one of them around looking for the UI elements.

Write down the shader's ID before flagging it, if it crashes you know what to leave alone.

And CPU usage can increase with the reordering active, but it's usually well worth it.

edit: here you go,
https://github.com/4lex4nder/ReshadeEffectShaderToggler
Last edited by Ser_Chonks; Jul 4, 2024 @ 2:49pm
FacePwn64 Jul 5, 2024 @ 11:46am 
So I guess the last remaining question is why LS(FG)'s framerate counter gets tricked by overlay crosshairs and notifications, but Steam, Ubisoft Connect, Nvidia, and probably more programs' framerate counters don't get tricked. Is there something those programs are looking "under" than LS isn't?
Last edited by FacePwn64; Jul 5, 2024 @ 12:01pm
Spook Jul 5, 2024 @ 12:27pm 
Originally posted by FacePwn64:
So I guess the last remaining question is why LS(FG)'s framerate counter gets tricked by overlay crosshairs and notifications, but Steam, Ubisoft Connect, Nvidia, and probably more programs' framerate counters don't get tricked. Is there something those programs are looking "under" than LS isn't?
Good question, that i don't have a good answer to. But i'm pretty sure someone in the LS-discord could tell you.
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Jul 4, 2024 @ 12:06pm
Posts: 8