Black Frame Insertion (BFI) Support Feasibility
Some newer displays are dropping support for black frame insertion such as the 2022 LG C2 TVs. Would it be possible for Gamescope to support BFI in software as an option?
I assume every other frame would just be black?
It can be that simple which is a 50% duty cycle and halving the effective panel refresh rate or it can be setup with a user defined duty cycle which would have to align with the target frame rate and display refresh rate, for example a target frame rate of 30fps on a 120hz screen can run BFI with a duty cycle of 75% on (single rendered frame repeated 3 times)/25% off (single black frame) as to not lower the screen brightness as much.
I assume every other frame would just be black?
I think that would be ideal given that going black should force the liquid crystals to remove the old frames, which in theory, should eliminate ghosting. Doing anything else would allow ghosting between non-black frames.
This would probably combine nicely with future HDR support, since the brightness would need to be doubled to compensate for the inserted black frames.
Making every other frame completely black will effectively halve the refresh rate you can see, so it's not a good idea except for games that can only run at half your monitor's refresh rate (60 FPS-locked games on 120 Hz, for instance).
Darkening every other frame by an user-adjustable factor is probably a better idea, so you can still benefit from the full monitor refresh rate in games that can run at arbitrary framerates.
Calinou, software BFI is FOR halving(or whatever division chosen) your effective refresh rate. That is the intended purpose. Darkening frames would put you in a weird middle ground. Software BFI brings the MPRT of full refresh rate(example: 240hz ~4ms mprt) down to lower virtual refresh rates such as 60hz. That's the entire purpose, to remove duplicate frames and create a lower effective hz while keeping motion resolution the same as max hz. I really hope BFI comes to gamescope someday, it would be an incredible addition, and a huge reason to use linux over windows(there's no compositor-level BFI in windows, always some crappy wrapper with inconsistent timing and drops).
A comment in support of those above. I've heard that BFI makes the image more pleasing to the eye - it doesn't float, no motion blur. In general, I don't see a lot of visual defects like ‘tiring’ in everyday life (In quotes, because I don't see it. I always try to disable vsync and replace it with the usual frame rate limiting). I wanted to test it, but from software solutions I found only an old library. To start it you need to know how to catch functions (but I'm too lazy to learn it now, maybe later), because it was developed for old libraries and now it doesn't work out of the box. In the end I tried on this site to compare animation with and without BFI. With BFI it really looks nicer, though it flickers because of low monitor frequency So it would be nice to get something like this in gamescope
Nowadays, it would make more sense to implement https://blurbusters.com/crt-simulation-in-a-gpu-shader-looks-better-than-bfi/ as it's more flexible. It's more comfortable to look at, you don't lose as much brightness as standard BFI and there are no image retention issues on LCD displays when using an even duty cycle. RetroArch already has an implementation of it.
@Calinou Misyl actually attempted to port the crt bfi shader to reshade and added it to her GamescopeShaders repo over here: https://github.com/misyltoad/GamescopeShaders/blob/main/Shaders/crt-simulator.fx I'm not sure if that shader actually currently works w/ gamescope right now
Also the performance might be less than ideal, since currently gamescope's code for handling reshade shaders in vulkan uses overly-conservative gpu barriers, also ideally the shader would be rewritten as a compute shader to better make use of async vulkan compute