-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] (BFIv2) BFI is more CRT-like at higher Hz. Need 60Hz BFI for 180Hz, 240Hz, 300Hz, 360Hz #10754
Comments
@twinaphex / @hunterk, who was the one who originally programmed the original BFI feature in RetroArch? |
I think it was Themaister. He doesn't really work on RetroArch anymore, but I'm sure someone else could expand on it. |
Are there anyone else other than @Themaister who has ever worked on RetroArch's BFI feature? |
I think anyone who implemented a video driver that supports it would have had some contact with it. It shouldn't be terribly complicated to work on it, but it will need to be done for each video driver. |
UPDATE!
See http://forum.arcadecontrols.com/index.php/topic,162926.msg1716439.html#msg1716439 |
For an explanation why image retention occurs with softare BFI, this is an explanation: There is also an algorithm to prevent "burn-in" on old LightBoost monitors, too! |
Someone has posted an experimental patch but is asking for help to polish the patch befire commit: This is in a github fork: And a test executable for 240Hz monitor owners:
It works fantastically but should be adjusted to be more flexible, to support the comma sequences ideally. There needs to be some more polishing work before it can be merged in and BFIv2 closed. |
They paid a visit to our discord server recently and we discussed some of it. They intend to clean up the PR a bit and then submit it and we can work with them to get everything covered and implemented. |
Great to hear! Long-term, frame presenting will need to be in a separate dedicated thread, separate of the frame rendering (emulator execution), though probably not critical for 240Hz-360Hz: https://forums.blurbusters.com/viewtopic.php?f=22&t=7496&p=57221#p57119 https://forums.blurbusters.com/viewtopic.php?f=22&t=7496&p=57221#p57130 It's might not be a mandatory feature yet, but increasing refresh rates (240Hz->360Hz->480Hz->720Hz->1000Hz) over this decade, will demand more precision to avoid flicker, and such precision will likely be mandatory for BFIv3 (#10757) at the higher Hz's. |
Crossposting from commit comments:
|
UPDATE: There is an item that may make BFIv2 easier/more flexible. [Feature Request] Futureproof RetroArch with precision frame pacing presenter thread |
Is this implemented in RetroArch? I can't see a difference in version 1.16.0, BFI is the same for me as it always has been, it flickers unevenly at 240hz and it needs 120hz to be even. It also naturally darkens the colors too much so it's unusable really. |
There should be the addition of a SDR->HDR converter with an HDR nits booster (I worked with Retrotink 4K which can do that), to brighten BFI via the HDR mechanism. Which can work with many HDR displays. While there's a command line option (use 3 instead of 1 black frame) to get 240Hz BFI working better. However, it doesn't work very well with all emulator modules -- the frame timing of RetroArch could use some further improvement, to try to time the frame presentation as micro-second prcise. The snap-to behavior of 60Hz refresh cycles (1/60sec ~= 16.7) is much easier than the snap-to behavior of 240Hz refresh cycles (1/240sec ~= 4.2ms) which presents more opportunity for the visible/black frames to accidentally display to the wrong refresh cycles. Your computer should also have its power management disabled, because GPU power management (e.g. idling between 60Hz emulator refresh cycles) can be a problem. Emulators with command line options to let it execute GPU operations in realtime (e.g. draw rasters to its GPU framebuffer every 1ms) usually work better than emulators that surge-execute at the beginning of its 1/60sec interval. This means if one emulator takes only 1-2ms to finish rendering a 60Hz emulated refresh cycles, your real GPU is idling for literally ~15ms until next emulator refresh cycle. That puts the GPU Power Management to sleep, and produces new timing inaccuracies. |
Reduced Source Code Bounty Requirements ($500 Bounty)See #10758 (comment)
|
New Methods of Emulating CRT Via Sheer Hz
I'm the founder of Blur Busters and creator of TestUFO. Today, we now have 240Hz 1ms IPS panels, and DELL is releasing a 360Hz IPS monitor this summer. This is an amazing opportunity for emulation.
Glossary
BFI = Black Frame Insertion, used to reduce motion blur on LCDs to mimic a CRT
BFIv1 = Classic 60fps at 120Hz BFI, already implemented in RetroArch
BFIv2 = Improvements to BFI for higher Hz, FOCUS OF THIS GITHUB ITEM
BFIv3 = Rolling-bar BFI, emulating CRT electron gun temporally, See GitHub #10757
Retroarch already supports 60Hz BFI for 120Hz
60Hz Black Frame Insertion (BFI) improves massively at higher refresh rates for multiple reasons. Strobed and non-strobed. RetroArch already supports 60 Hz software BFI for 120Hz displays.
To understand black frame insertion, see animation demo: www.testufo.com/blackframes
This works great, and is already discussed in this libretro thread
Newer monitors already actually improved BFI in existing RetroArch. For example, 120Hz strobed on 240Hz panels look better than 120Hz strobed on 144Hz panels. And 240Hz IPS just came out too (better colors). 240Hz 1ms IPS strobed monitors look far better than old LightBoost panels, such as the Blur Busters Approved ViewSonic XG270 gaming monitor 240Hz 1ms IPS panel, which looks great with existing 120Hz PureXP+ on existing RetroArch BFI
Discovery That Higher Hz Improves Software BFI (240Hz, 360Hz)
We discovered that higher refresh rates improve software BFI even further for many reasons such as:
Animation Demonstration:
If you have a 60Hz monitor, animations will be very limited in explaining BFI, but you can view this Simple 60Hz Demo of Three Different BFI Motion Blurs. This will run at only 20 frames per second, but will adequately demonstrate the variable-blur BFI concept via custom blackframe sequences.
If you have a 240Hz monitor in sample-and-hold mode, view this upgraded TestUFO Variable-Blur Variable-Brightness BlackFrames Comparison. You'll immediately see the pros/cons. You can still view this on a 120Hz monitor to see this in a kind of a slow-motion, at least to gain a better understanding.
If you have a 120Hz monitor in LightBoost mode with a chessboard-pattern problem, view this upgraded TestUFO Inversion-Artifact-Proof BlackFrames Animation, you'll see the last UFO no longer have a chessboard pattern artifact. But it only runs at 40 frames per second. Chessboard patterning is often an issue on TN panels due to voltage inversion. Fixing this requires a 240Hz monitor configured to 180Hz with strobe enabled (e.g. BenQ XL2546 monitor, ViewSonic XG270 monitor). This, incidentially is also burnin-proof too.
Fun Education: There is now a TestUFO emulation of CRT 30fps at 60Hz side effect. This is just an educational exercise on how software BFI can still emulate the side effects of a CRT (half frame rate behavior). Mind you, this animation looks more correct on a 120Hz monitor, because it requires a 4-refresh sequence, but it's still passable education at any refresh rate.
Eliminates Image Retention
Odd-divisible refresh rates (180Hz and 300Hz) are completely image-retention-proof, since it doesn't interfere with LCD voltage inversion electronics. BFI is completely safe on all 180Hz-capable and 300Hz-capable monitors. Most 240Hz gaming monitors are capable of doing a 180Hz refresh rate.
FEATURE REQUEST:
Support Adjustable Software BFI for Higher Hz
We neeed RetroArch to support the following Black Frame Insertion (BFI) sequences:
BFI sequence on 120Hz for 60Hz emulation: ON, OFF
BFI sequence on 180Hz for 60Hz emulation: ON, OFF, OFF
BFI sequence on 240Hz for 60Hz emulation: ON, OFF, OFF, OFF
BFI sequence on 300Hz for 60Hz emulation: ON, OFF, OFF, OFF, OFF
BFI sequence on 360Hz for 60Hz emulation: ON, OFF, OFF, OFF, OFF, OFF
Best Case Display Motion Blur Reduction by BFI
The easiest way to do so is provide a comma-separated black-frame insertion sequence in a configuration file, to allow customizability. Default strings can be done for common scenarios, but would let advanced users customize BFI. Relative to the original blur of a 60Hz LCD, higher Hz produces more software-BFI-blur-reduction (non-strobed LCD use-case, though software BFI also helps hardware strobing too for these specific numbers, in lower strobe lag + better quality strobing).
120Hz BFI sequence (50% less motion blur): 1 , 0
180Hz BFI sequence (66% less motion blur): 1 , 0 , 0
240Hz BFI sequence (75% less motion blur): 1 , 0 , 0 , 0
300Hz BFI sequence (80% less motion blur): 1 , 0 , 0 , 0, 0
360Hz BFI sequence (83% less motion blur): 1 , 0 , 0 , 0 , 0 , 0
Adjustable Motion Blur (Tradeoff Between Flicker + Brightness + Clarity)
Custom sequences can allow you to adjust motion blur, brightness, and flicker tradeoff. Just like TestUFO Variable-Blur BFI Demo. Try this link on a high-Hz LCD with hardware strobing distabled! If you have 240Hz, try configuring 4 or 5 UFOs instead, to see more variable-blur flexibility. Adjustability is a continuum between hardware Hz to emulator Hz. Minimum persistence-based display motion blur is persistence of max Hz (1/360sec visibility = 2.8ms blur). Maximum display motion blur is emulator Hz (1/60sec visibility = 16.7ms blur). Thus higher Hz, the more BFI motion blur adjustability.
180Hz bright BFI sequence (33% less motion blur): 1 , 1 , 0
240Hz bright BFI sequence (25% less motion blur): 1 , 1 , 1 , 0
360Hz bright BFI sequence (66% less motion blur): 1 , 1 , 0 , 0 , 0 , 0
360Hz bright BFI sequence (33% less motion blur): 1 , 1 , 1 , 1, 0 , 0
Basic CRT Phosphor Decay Emulation
In fact, alpha-blended BFI is also desirable, so this could be a percentage setting or floating point setting, to approximate phosphor fade. This makes flickerfeel more approximate a CRT tube (as far as refresh granularity permits). And feels much less harsh than 60Hz squarewave for many.
240Hz alpha-blended BFI slow-rise slow-decay sequence: 0.5 , 1 , 0.5 , 0
360Hz alpha-blended BFI slow-rise slow-decay sequence: 0.5 , 1 , 0.5 , 0 , 0 , 0
360Hz alpha-blended BFI fast-rise, slow-decay sequence: 1 , 0.5 , 0.25 , 0 , 0 , 0
360Hz alpha-blended BFI fast-rise, superslow-decay sequence: 1 , 0.75 , 0.5 , 0.25 , 0.1 , 0
Alternative methods of configuration could be discussed instead.
Hopefully this is a very easy change for a RetroArchfor the refresh rate race to retina refresh rates. For now, this can be just a simple configuration file string, to help users incubate this. It should be easy to write instruction guides, to help get more users playing with BFI.
BFI Percentage Terminology (in case it wasn't clear)
1 = Fully visible frame
0 = Fully black frame
0.5 = A darkened frame that is 50% brightness
Tips
Once this feature is implemented, I'd be happy to write an article about this to improve emulator BFI awareness among high-Hz monitor users
Hopefully this is a very easy change for RetroArch for the refresh rate race to retina refresh rates. For now, this can be just a simple configuration file string, to help users incubate this. It should be easy to write instruction guides, to help get more users playing with BFI.
The text was updated successfully, but these errors were encountered: