BFI Shader: adaptive_strobe-koko

Hi there,
I’d like to share my take on the sample-and-hold induced blur.

Simple strategies usually insert black subframes to make motion crisp, but this has the obvious limit that the image will be darker (@GemaH).
while more complex ones even tries to emulate the beam, but they always trade brightness for clarity.

The idea here is to alternately brighten/darken every screen pixel without clipping bright tones/crushing dark ones so that the perceived average image will be the source one.

The pro is that the image retains its brightness; the con is that the effect will be less evident on higher and dark colors (due to less “room” to change brightness without going into high/low “saturation”);

On top of that, the LCD or OLED “pixel” refresh (B2W,GTG,BWB) has to be low and the screen refresh at least 120Hz to allow subframes (even though surprisingly my poor mva monitor benefits from this shader even at 60hz but with evident flickering ofc.)

However, even if the theory is exact and implementation correct (which I don’t claim) If the pixel refresh time is high or uneven when going from dark to white vs white to dark, the resulting image color/gamma may differ from the source one.

My LG OLED C2 at 120hz performs very well, my DELL IPS is completely trash and my Benq mva has serious issues with dark tones.

Btw, I’ve added some tunables in the shader for you to try to compensate display shortcomings:

  • Adaptive Strobe (~BFI) Strength:
    This is the strength of the effect, the more the less motion blur, the more the flickering.
  • Gain adjustment:
    The shader will never clip the image, but If it appear unbalanced compared to bright tones you can lower this parameter.
  • Post Gamma adjustment:
    Even if i never found this useful in my test, maybe some display will need some gamma adjustment.
  • LCD Retention workaround cadence (frames):
    Some (IPS?) panels may suffer from temporary image retention when BFI/like is used. This parameter will invert the flipping every number of frames configured, hopefully workarounding that issue.
  • Debug: Flip effect ON/OFF every (frames):
    This value will temporarily disable the shader every specified number of frames, allowing you to easily observe any difference.

I’d like to hear about how this performs on your hardware, possibly when using subframes, maybe I’ll submit for integration to the official slang shader repo.

The shader can be appended without problems.

http://wpage.unina.it/aorefice/sharevari/adaptive_strobe-koko.zip

9 Likes

I added a pre-gamma setting too. Also, there was a bug (fixed) that caused the shader to be always disabled on some gpus when the debug option was set to 0.0.

Since this shader theory is very very… VERY simple, much of the problems that can be observed really depend just on the end user display.

I added the knobs that can be useful on the hardware i tested it on, but I’d really like to have some feedback to make it work on a wider range of devices, thanks!

http://wpage.unina.it/aorefice/sharevari/adaptive_strobe-koko-2.zip

2 Likes

You know, I actually had an idea for this type of BFI/Strobing/Sample and Hold Reduction but my idea was to simply divide the screen into a checkerboard pattern and blank off alternating pixels from each line.

1 Like

Tried :slight_smile: It is buried somewhere in koko-aio as a dead function called strobe_checkerboard() if I remember well, not really effective unfortunately…

1 Like

Thanks to @hunterk, the shader should be available under subframe-bfi/ shaders through retroarch online update.

I renew the request for testing results.

1 Like

I’ve done a lot of testing with checkerboard and interlacing-style (either horizontal or vertical lines) and none of them help with motion clarity for some reason (with checks/lines sized either as physical pixels or game texels). I had read some stuff on the blurbusters forum about this being the case, but I had to see for myself :stuck_out_tongue: