CRT Simulation in a GPU Shader, Looks Better Than BFI

CRT Simulation in a GPU Shader, Looks Better Than BFI

Who 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.

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)

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.

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.

  • 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.

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.

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.

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.

 

Leave a Comment

Your email address will not be published. Required fields are marked *