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.

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.

Slow Motion Versions

For higher Hz displays (large native:simulated Hz ratio), the raster can be configured with a quicker simulated phosphor fade for lower MPRTs:

EDIT: Shadertoy is having problems with autoplaying this despite compiling fast (<0.1s on our gamer target); and it doesn’t continue playing when you click. Try accessing it more directly here: 

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 native refresh cycles must be reprocessed, regardless of if the content frame rate is lower than the simulated CRT refresh rate or the native display refresh rate. That means for a 240Hz display, you need to reprocess 240 refresh cycles per second even for 30fps content on a simulated 60Hz CRT.

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 / SpecialK / LSS / Etc?
A: Possibly in the future (developers are trying now!), 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. You may also desire to learn about Windows Compositing Swapchain, for easier Hz-granularity shaders.

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: I see very noticeable banding in the CRT simulator.
A: Make sure you’re running in SDR using an Adobe sRGB mode, with a common gamma curve (2.2 or 2.4). In addition, there may be a little black clipping and white clipping. Try calibrating your display with the TestUFO Black Levels (PLUGE) and TestUFO White Levels (Clipping) tests. Also, if you have a 6-bit TN panel, try running an odd-numbered native:simulated Hz ratio to avoid strange interactions with panel FRC or inversion algorithms. In winter 2025, there will be an improved version of the CRT shader that will have an optional black level lifter / white level dropper.

Q: I have banding I cannot fix! I have erratic random flicker!
Please see Known Solutions List, and follow the instructions. There are several tweaks that makes the banding and flicker disappear. Some surprising culprits include multimonitor mode (Multi-Hz interference), background RGB animator software (CPU spikes that cause CRT simulator to flicker), bad picture adjustments (e.g. Control Panel contrast/brightness adjustments can make banding appear/disappear), amongst other issues.

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. Try to sequence your processing in the same sequence a CRT would do (electron beam simulator before phosphor mask step). I recommend doing the CRT beam simulation at the original resolution before scaling, in this workfow:

[Original frame] -> [Picture adjustments] -> [CRT beam 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.

 


About Mark Rejhon

Also known as Chief Blur Buster. Founder of Blur Busters. Inventor of TestUFO. Read more about him on the About Mark page.

32 Comments For “CRT Simulation in a GPU Shader, Looks Better Than BFI”

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sort by:   newest | oldest | most liked
Porkchoppin
Member
Porkchoppin

This is super cool! I love how dedicated you guys are to providing more motion clarity solutions, and this has so much potential if lots of software provides support for it. Do you think we’ll ever beat OLED ABL?

It seriously sucks just how incredible OLEDS look with their black levels, colors and just how compatible they are with BFI and a shader like this, but ABL is so visibly distracting and awful that I can’t see myself getting an OLED again until it’s finally conquered.

MajorPainTheCactus
Member
MajorPainTheCactus

So my question is why do CRTs have totally different fall off characteristics to the screen shots of this shader? If you look at Slo Mo Guys CRT youtube video the phosphor fall off is minimal and is exponential from the single scanning line. This shader is nearly full screen by the looks of it and looks like it has the opposite fall off curve – staying high then dropping off compared to a CRT that drops off immediately. Why does a single horizontal bar of the screen that scrolls down not work as it seems closer to what an actual CRT would do especially at higher refresh rates i.e at 480hz you’d illuminate only 1/8th of the screen at a time. Is it still a case of getting around oled lcd darkness compared to the searing high nits at the CRT scanline and/or getting around display/pixel/polarity inversion inherent in such displays to stop damage? Can display manufacturers (who have more control) still do a better job of simulating a CRT if they were incentivised to do so?

BlurBusterNewb
Member
BlurBusterNewb

Can this tech be used to improve motion clarity on 24fps 4k blu rays and/or streaming movies?

Would it be possible, easy, and/or low cost for companies like LG, Sony, Samsung etc to update their firmware to include this feature on current TVS? Would it be similar to switching BFI on/off?

Most importantly, how can the community let these companies know how much we value this tech and how much we want it as a feature? CES is this week so I hope info about this tech is being spread to vendors!

BlurBusterNewb
Member
BlurBusterNewb

Can this tech be used to improve motion clarity on 24fps 4k blu rays and/or streaming movies? If not now, is there hope for the future?

1mongus
Member
1mongus

Can we have a thread for this? I’d like to know asap when this is available in reshade/the rest

wpDiscuz

Recent Content