17
CRT Simulation in a GPU Shader, Looks Better Than BFI
blurbusters.comWho Is this for? CRT Enthusiasts, software & hardware developers, emulator authors, all of who wish to reduce display motion blur of 60 years of legacy 60fps 60Hz content with softer flicker than BFI.
UPDATE 2024/12/24: It just got added to Retroarch emulator on github quickly, the same day we released this! The next public release of RetroArch will include this CRT beam simulator mode as a setting.
New Open Source Algorithm of Simulating CRT Raster-Scanning
People who have seen a CRT tube in motion, know how shockingly clear motion they are. Blur Busters is born of display motion blur reduction, and so we've been fans of all kinds of motion blur reduction techniques.
Between myself and Timothy Lottes (ex-NVIDIA ex-AMD), we have come up with a breakthrough algorithm for simulating a CRT tube, now released on shadertoy and github, with the following features:
Major motion blur reduction on 240Hz+ displays.
Soft phosphor fade & rolling scan, less eyestrain at same Hz than BFI or strobe mode.
Variable per-pixel MPRT (Timothy Lotte's brightness redistribution algorithm).
Great for reducing display motion blur of 60 years of legacy 60fps 60Hz content.
Works on LCDs and OLEDs
Realtime (for retro & emulator uses) and slo-mo modes (educational)
Brightness adjustment (less motion blur at lower gain values, by trading off brightness)
Seamless; no banding* (when ABL algorithm in display isn't interfering)
Real-Time Versions
Before running these animations, they may not look good on all displays; more Hz is better. These real time versions requires a performant GPU. You may see ugly erratic flicker if your GPU is too slow. Your display motion blur reduction will be limited by by the native:simulated Hz ratio. More Hz the merrier.
Flicker sensitivity note: Do not click these below links if you are sensitive to flicker.
Real-time simulation of 60 Hz CRT for your 120 Hz display (up to 50% blur reduction)
Real-time simulation of 60 Hz CRT for your 240 Hz display (up to 75% blur reduction)
Real-time simulation of 60 Hz CRT for your 480 Hz display (up to 83% blur reduction)
NOTE: Do not click the 480Hz link if you only have 120Hz or less!
Slow Motion Versions
Slo-motion simulation using 16 segments (60fps 60Hz CRT on future 960Hz displays)
Slo-motion simulation using 4 segments (60fps 60Hz CRT on today's 240Hz displays)
For higher Hz displays (large native:simulated Hz ratio), the raster can be configured with a quicker simulated phosphor fade for lower MPRTs:
For lower Hz displays (small native:simulated Hz ratio), the beam will require a very tall height, to give sufficient coverage. The real-time version flickers less than BFI, due to the rolling-scan and phosphor fade.
Pre-Requisites for Good CRT Simulation
Most discrete GPUs work (Radeon, GeForce, Arc).
Some fast mobile GPUs work (iPhone 120Hz with 'Prefer Page Updates Near 60fps' turned off).
Recommended: 240 Hz OLED
Minimum: 120 Hz LCD (non-FALD, due to local dimming lag)
Fantastic: 360-480 Hz OLED
Display ideally configured to SDR mode (LCD or OLED).
This is because the current formulas used in the shader (gamma2linear and linear2gamma) is expecting the ability to calculate a photon budget for brightness-spreading over multiple refresh cycles for brightest pixels. This lowers persistence of average brightness pixels, and brightens the CRT simulation significantly. If you do any HDR boosting, you may need to readjust the GAIN_VS_BLUR constant and the GAMMA constant until banding disappears.
For Software Implementation
We look forward to seeing software and hardware developers implement this algorithm as optional motion blur reduction that is superior to plain black frame insertion.
Software such as emulators (e.g. Retroarch);
Video processor devices (e.g. Retrotink 4K, whom I helped with the BFI addition)
Game engines that adds an optional low motion blur setting (e.g. fast scrollers)
Display firmwares to add an optional CRT emulation mode
Remember, that all refresh cycles must be reprocessed, regardless of if the content frame rate is lower than the simulated CRT refresh rate.
Temporal Simulation can be added to Spatial Simulation
This temporal simulation (CRT electron beam) can be combined with your spatial simulation (CRT mask filters). Combine this with OLED blacks and colors, and it create a fantastically visually-accurate simulation of CRT refreshing. Blur Busters works in the (display+temporal) domain, as seen in our Display Research, Science & Engineering Portal.
Frequently Asked Questions
Q: How do I run this app?
A: This isn't an application yet; it's only an engine, an algorithm. Software developers need to implement this algorithm into their emulator. We hope to see Retroarch-type and Retrotink-type implementations in the future.
Q: How is it better than BFI or a strobe backlight?
A: 60Hz BFI and strobing flickers a lot. CRT simulation is much gentler for 60fps content, because of phosphor fade & rolling scan. Some light is emitted somewhere else on the screen all the time. Right tool for Right Job.
Q: Can I add it to ReShade?
A: Possibly, with a major restriction: All refresh cycles must be reprocessed independent of game frame rate. You need to guarantee processing of all refresh cycles (perfect permanent framerate=Hz shader processing) independently of game frame rate fluctuations. This may require a Windows IDD (e.g. iddSampleDriver or virtual-desktop-rs) or a specially modified version of wehem's DesktopBFI fork.
Q: It looks like crap! Why?
A: You need a bright display, try a 240Hz+ OLED. Also some local dimming LCDs have a backlight lag that sometimes interferes with quality.
Q: It looks amazing! How?
A: Algorithmic magic. It took two smart brains to combine. Mark Rejhon's CRT beam simulator was combined with Timothy Lotte's variable-MPRT BFI algorithm that compresses MPRT for average brightness pixels, and lengthens MPRT for brightest pixels.
Q: Can I program CRT mask filters into this?
A: Yes, software developers can add spatial CRT filters as a processing pass after this temporal CRT beam simulation. I recommend doing the CRT beam simulation at the original resolution before scaling, in this workfow:
[Original frame] -> [CRT simulation] -> [Scaling & CRT filter masks]
Q: Where is the source code?
A: It's at github.com/blurbusters/crt-beam-simulator
Q: I need help implementing this!
A: If you need advisory services implementing this into your product, contact me at services.blurbusters.com.
all hail CRT shaders. At this point i should just get a real CRT
It's waaay easier to lug around a crt shader