libretro / libretro/RetroArch

crt-beam-simulator shader causes constant frame time spikes accompanied by severe flickering

Open
#17,341 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Is there an existing issue for this?
  • This is a bug in RetroArch frontend
  • I have searched the existing issues
Description

Loading the crt-beam-simulator shader preset causes frame time spikes at a constant and frequent interval (every half second or so), and each spike is accompanied by severe screen flickering (not just regular BFI flicker, but a full-on black screen flash).

The result of these frame time spikes is that the frame rate, otherwise perfectly locked to 120 on my 7800X3D/4090 system, also dips by 1, to 119 fps, with every single spike.

This happens with shader sub-frames correctly set to 2, as my display's refresh rate is 120Hz (LG C9 OLED TV). And it only happens after the crt-beam-simulator shader is loaded.

Other shaders (like crt-royale, for scanlines) do not cause the issue, and it also doesn't occur until a few seconds after the crt-beam-simulator shader is loaded. Changing any settings via the menu seem to cause the issue to stop for a few seconds (three to four), until it starts happening again.

I've seen hardware BFI at 60Hz and 120Hz, and the level of flickering is nowhere near what's being shown by RetroArch with crt-beam-simulator. And, as mentioned, it only happens when the frame time spikes start occurring.

Here are two screen caps showing RTSS's frame rate and frame time graph:

This is with no frame rate cap via RTSS or other external, third-party software (hard to notice the spikes, as the frame time line is all over the place);

This is with the frame rate capped to 120 via RTSS (notice the perfect flat frame time line, with tiny bumps caused by crt-beam-simulator).

I've tried disabling all background apps and processes, but the issue still occurs. All RetroArch settings were left at default. I've tested with bsnes and Snes9X cores, same behavior in both. Also tested with Vulkan and D3D12 APIs - again, no change.

Expected behavior

No frame time spikes are expected and the frame rate should remain constant even after loading the crt-beam-simulator shader.

Steps to reproduce the bug
  1. Load a game;
  2. Load the crt-beam-simulator shader;
  3. Wait a few seconds, screen starts flickering like crazy and the frame time spikes occur every half second or so.
Version/Commit

1.20.0

Bisect Results

No response

Check in the nightly version

Yes, this is reproduced in the nightly build

Platform & operating system

Windows 11 23H2

Affected Cores

bsnes, Snes9X, likely others

Environment information

4090
7800X3D
64GB DDR5 6000

Relevant log output

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported reproduction steps using the crt-beam-simulator preset, then compare behavior across the Vulkan and D3D12 paths and the bsnes and Snes9X cores. Done means the preset no longer produces recurring frame-time spikes, black-screen flicker, or the associated drop from 120 fps on the reported Windows setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.