Black Frame Insertion possible via shader?

  • fluffymadness
  • Topic Author
More
5 years 10 months ago #1 by fluffymadness Black Frame Insertion possible via shader? was created by fluffymadness
Hi guys. I'm very interested in blur reduction for games that are fps locked to 60, especially for shmups.
One method of doing this is black frame insertion. Emulators like retroarch and groovymame already support this.
But it would be interesting if I could get it to work with pc games too.
The technique works this way:
1st frame
2nd frame: complete black picture
3rd frame
4th frame: complete black picture.
My understanding is when I have a display that is set to 120hz refresh rate and a pc game that is locked to 60fps...I think it should render each frame twice.
Would it somehow be possible to write a shader that colors every doubled frame completely black ?
This way motion blur should be cut in half.( I think it should correspond to the 8ms entry on the motion blur chart of blurbusters www.blurbusters.com/persistence-vs-motion-blur/ )
And yes 50% of display brightness would be gone in an instant ;)
So do you think something like that would that be possible ?
The following user(s) said Thank You: andrew, avrion

Please Log in or Create an account to join the conversation.

  • avrion
More
5 years 10 months ago #2 by avrion Replied by avrion on topic Black Frame Insertion possible via shader?
I'd be interested in this as well.

Please Log in or Create an account to join the conversation.

  • Fu-Bama
More
5 years 10 months ago #3 by Fu-Bama Replied by Fu-Bama on topic Black Frame Insertion possible via shader?
I tested it out some time ago. First the game must be v-synced, otherwise there is significant black bars screen tearing. Second, game must run at monitor refresh rate, as ReShade is synced with application FPS, not actual monitor FPS. So in order for this to work, your game must run at 120FPS with V-Sync ON.

But there's another way for black frame insertion, if your monitor supports stereo-3D, you can make it, so that "left eye" sees game graphics and "right eye" black screen. This way without 3D glasses you will have black frame flip-flop.
The following user(s) said Thank You: fluffymadness

Please Log in or Create an account to join the conversation.

  • fluffymadness
  • Topic Author
More
5 years 10 months ago - 5 years 10 months ago #4 by fluffymadness Replied by fluffymadness on topic Black Frame Insertion possible via shader?
@Fu-Bama, do you still have that black frame insertion shader somewhere ? I'd love to try some games with it.
Sadly I have no stereo 3d monitor, or a monitor with ulmb.
It seems there is no real way to do black frame insertion with 60fps content.
Only readup I've found on software based bfi via shaders is on the blurbusters forum, but no real solution for 60fps content was found in that discussion either.
forums.blurbusters.com/viewtopic.php?t=3223
Last edit: 5 years 10 months ago by fluffymadness.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
More
5 years 10 months ago #5 by BlueSkyKnight Replied by BlueSkyKnight on topic Black Frame Insertion possible via shader?
This is apart of the code I used for Frame Sequential. It can do Black Frame Insertion. You need a serious type of Vsync. 120hz minimal for BFI. I also added a few other types of Frame Alternation. For testing with 60Hz monitors. But, I doubt it would work. Also if you have epilepsy or prone to attacks DO NOT USE THIS SHADER. I mean it.

Warning: This shader should not be used by people with epilepsy.

github.com/BlueSkyDefender/Depth3D/blob/...Frame_Alternation.fx

Warning: This shader should not be used by people with epilepsy.
The following user(s) said Thank You: fluffymadness

Please Log in or Create an account to join the conversation.

  • fluffymadness
  • Topic Author
More
5 years 9 months ago #6 by fluffymadness Replied by fluffymadness on topic Black Frame Insertion possible via shader?
Thx for your shader. The 120hz bfi shader works really great. Tested it with assault android cactus and nex machina.
I also tested the alternating patterns in the shader for games that are locked to 60fps, but as you have guessed, there isn't really any noticable blur reduction with that modes.

Please Log in or Create an account to join the conversation.

  • okaxihd
More
5 years 9 months ago - 5 years 9 months ago #7 by okaxihd Replied by okaxihd on topic Black Frame Insertion possible via shader?
Thank you very much for the codes ;) , but I wanted to know if you have any way to make frames like 30fps, 45fps, etc. at 144hz, because I tested here and it gets too flashy and in frames below 120fps a lot too high for today's top games! :blink:
Thank you again! and sorry my english ;)
Last edit: 5 years 9 months ago by okaxihd.

Please Log in or Create an account to join the conversation.

  • FriskyNoodle
More
4 years 11 months ago #8 by FriskyNoodle Replied by FriskyNoodle on topic Black Frame Insertion possible via shader?
Warning: Spoiler!


Hey can you reupload? I would absolutely love this!

Please Log in or Create an account to join the conversation.

  • Poudingue
More
4 years 5 months ago #9 by Poudingue Replied by Poudingue on topic Black Frame Insertion possible via shader?

Please Log in or Create an account to join the conversation.

  • sp82
More
4 years 4 months ago - 4 years 4 months ago #10 by sp82 Replied by sp82 on topic Black Frame Insertion possible via shader?
I have some crasy idea guys and I am here to make you fill seek.

Is it possible to insert black frames without sending them on the screen? and also apply a depth/stencil mask to make this black frame computationally zero basically. This cold be used to kill some 3d engines internal lag duo frame queuing for example that show much increased input latency with vsync-on like CSS for example.

Case One: In the case of games can render much more fps much then the monitor refresh rate.
Sequence: BlackFrame+BlackFrame+BlackFrame+RealFrame.
Explanation: the number of black frame variable depending the Frame Time to move the RealFrame at the end of the rendering time window to even more lag reduction.

Case Two: In the case of games that can render at fps just above monitor refresh rate.
Sequence: RealFrame+BlackFrame+BlackFrame+BlackFrame.
Explanation: in this case we want to render the RealFrame as soon as possible to not miss the vsync but we can insert BlackFrames at the end.

This can work if the engine as no internal frame pacing in other case will be a mess.

I am curious if is possible to implement a fps cap shader that do also frame pacing to use with vsync-on with adaptive sync just below the max refresh rate of the monitor. This could give much more smooth gameplay for some games. I need to cap the fps just 2 fps below the max refresh rate because my monitor is one of the bad freesync monitors that have brightness flicker.
Last edit: 4 years 4 months ago by sp82.

Please Log in or Create an account to join the conversation.

  • Riadon
More
2 years 9 months ago #11 by Riadon Replied by Riadon on topic Black Frame Insertion possible via shader?
Bump, does anyone have a spare copy of Frame_Alternation.fx linked in this thread?

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.