Skip to content
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

Solutions to Known Issues [Banding, Color Ghosting, Erratic Flicker] #4

Open
mdrejhon opened this issue Dec 27, 2024 · 1 comment
Open
Labels

Comments

@mdrejhon
Copy link
Member

mdrejhon commented Dec 27, 2024

Known Issues That Are Fixable

  • Banding Issues (see instructions below)
  • Flicker Issues (see instructions below)
  • Limited motion blur reduction (see instructions below)
  • Chroma ghosting issues (wait for January 2025 release)

End-User Instructions to Improve Quality

For those visiting, best practices:

INSTRUCTIONS: Fixing Banding

  • MAJOR contributor:" Thin dark/bright bands: Do picture adjustment processing before the CRT beam simulator shader, not after. Do it like a CRT, put the picture adjustment processing in the figrative CRT electronics before the beam, so put picture adjustment shaders BEFORE the CRT simulator.
  • Configure your settings to "Adobe sRGB" at display menu and OS menu (Macs: switch from XDR to this mode temporarily)
  • Adjust your levels to not clip www.testufo.com/blacks and www.testufo.com/whites
  • Try disable picture adjustments in NVIDIA Control Panel & disable display profiles (icc)
  • Try both SDR and HDR. Most displays behave better in CRT simulator.
  • Try lowering GAIN_VS_GAMMA (Brightness vs Blur tradeoff)
  • Try turning your CRT phosphor mask filter on/off. Some (not all) filters create banding (see bottom)
  • 6bit TN panels: Try odd native:simulated Hz divisors (e.g. 180Hz for 60fps material)
  • Disable VRR (it sometimes caused erratic flickers and banding)

INSTRUCTIONS: Improving Motion Blur Reduction

  • Lower the GAIN_VS_GAMMA (Brightness vs Blur tradeoff)
  • Try to use large native:simulated Hz ratios, 240Hz+ preferred over 120Hz, purchase new monitor if needed
    • 120Hz reduce motion blur up to 50% for 60fps content
    • 240Hz reduce motion blur up to 75% for 60fps content
    • 480Hz reduce motion blur up to 87.5% for 60fps content
  • For LCDs, try testing odd-number native:emulated Hz divisors to avoid the vertical band drift

INSTRUCTIONS: Fixing Erratic Flicker

  • Quite as much background software as you can.
  • Disable multimonitor temporarily (Win+P), multi-Hz multimonitor can create erratic flicker
  • Quit all RGB software (like Razer Chroma or Gigabyte RGB Fusion)
  • Make sure www.testufo.com/animation-time-graph doesn't show several red spikes per second, browsers are stutter-canaries in a coal mine, so if you can get a browser to run smooth, it means application will generally run smooth
  • Disable VRR, the variable frametimes creates erratic flicker unless you have microsecond-accurate frametimes.

INSTRUCTIONS: Reducing Chroma Ghosting

  • The chroma ghosting will reduce if you significantly lower GAIN_VS_BLUR setting
  • This is more of a problem with saturated games (Super Mario World) than with desaturated games (Tomb Raider)
  • Test out blurry-pixels rather than square-pixels simulations, to 'hide' the chroma ghosting better. Real tubes did not have perfectly sharp-square or sharp-rectangular pixels.
  • There will be an additional adjustment for chroma ghosting in January 2025

INSTRUCTIONS: Fixing Apple Limitations

  • For 120Hz Apple Safari via WebGL/shadertoy, set "Prefer Page Rendering Updates Near 60fps" to OFF in Developer Flags of Safari, see screenshots on either Twitter/X or Google for instructions.
  • Apple: Shadertoy stutters more on Mac than iPhone/iPad - MacOS browsers (all of them) stutters more; even a lowly iPhone 11 thru 14 stutters much less than MacBook M4. You have to do a lot to overcome Apple's power management (I use MacBook 120Hz HDR to develop TestUFO 2.x, I'd love you Apple employees to fix compositor bugs in MacOS).

Developer Best Practices on Shader Sequencing: Think Like a CRT

Shader programmers need to sequence things properly:

  1. Original machine generates frame. Do any rendering or framegen before the video input jack of a simulatdd CRT tube.
  2. CRT electronics does picture adjustments first. Do picture adjustment shaders first.
  3. CRT yoke shoots electron beam. Do CRT beam simulator next.
  4. CRT phosphor mask lights up dots. Do CRT phosphor mask filters last*

If you're adding a CRT simulator shader to your software, remember to run the CRT simulation shader at full native monitor Hz, regardless of your content frame rate. Whether you're doing 60fps on a simulated 60Hz CRT at 240Hz native Hz, or whether you're doing odd-divisors (works) like 24fps movies via 72Hz simulated CRT on a 240Hz display (works too), FRAMES_PER_HZ is a float, just need at least 2:1 native:simulated.

*(Note: Some filters distort the gamma curve, make your filter gamma-curve-preserving or banding will appear. It needs to be similar before/after filtering, or it violates Talbot Plateau Theorem math of the simulator)

@mdrejhon
Copy link
Member Author

mdrejhon commented Dec 27, 2024

In summary, technical behaviors:

  • LCD voltage inversion behaviors
  • TN LCDs 6-bit issues
  • Interactions with black level clipping (creates bands)
  • Interactions with white level clipping (creates bands)
  • Some displays behaves amazing, others displays behave bad

Some workarounds are going to be made for January 2025 release.

  • Global mode (like a global phosphor BFI)
  • Color balanced variable MPRT setting (toggle), will reduce color ghosting
  • Black level lifter
  • White level dropper

These will improve the CRT simulator, and will likely be deployed to Retroarch very quickly. ETA winter 2025, hopefully ASAP.

However, please follow instructions above.

@mdrejhon mdrejhon changed the title Known Issues [Banding, Color Ghosting, Washed Out] Solutions to Known Issues [Banding, Color Ghosting, Washed Out] Dec 31, 2024
@mdrejhon mdrejhon added the HOWTO label Dec 31, 2024
@mdrejhon mdrejhon changed the title Solutions to Known Issues [Banding, Color Ghosting, Washed Out] Solutions to Known Issues [Banding, Color Ghosting, Erratic Flicker] Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant