Output 2 frames from 1 shader/Inserting new frame

  • Posts: 6
4 months 3 weeks ago - 4 months 3 weeks ago #1 by Faweks1
Hi, i'm trying to create shader that will take actual frame and push it twice to output. So if game is running in 60FPS it will be running in 120FPS with duplicated every frame.

Example frames:
ABCDEF
After filter it should be like:
AABBCCDDEEFF

Can this be achieved with shader and some sort of multirender?

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

  • Posts: 6
4 months 3 weeks ago #2 by Faweks1
To be more specific - can i insert new frame in the shader output?

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

  • Posts: 1221
4 months 3 weeks ago #3 by Marty McFly
If you have a 120Hz screen, and you have a game running in 60 fps, that is precisely what happens. If only every second (screen) frame a new frame comes from the GPU, the screen will keep showing the old frame once more. Inserting custom frames however is not possible, as all you do with ReShade is to append information after the (GPU generated) frame is completed. So for 60 fps you stuff a bit of processing in between each frame and that makes your fps even lower.
The following user(s) said Thank You: Faweks1

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

  • Posts: 6
4 months 3 weeks ago - 4 months 3 weeks ago #4 by Faweks1
Thank for explanation!
I'm working with BlueSkyDefender's SuperDepth3D shader, adding frame sequential output.

Right now if game can hit stable 120FPS with shader ON, with forced frame limiter (120FPS, Limiter V2, VSync OFF) with NVidiaProfileInspector and with windowed borderless fullscreen - everything works as expected. (I know i should save last frame and then use it for right eye image, but this will be fix for later :) )

I think it can be possible to run any game @60FPS with shader ON, but there have to be some sort of frame injection - just to generate 120FPS.
I'm considering now ENB injection + Reshade, where ENB should work on black frame insertion and Reshade will just swap black frame to image of right eye.

Let me rephrase my question then.
Can something like black frame insertion be done by some software implementation or injection via ENB (or something else) ?

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

  • Posts: 808
4 months 3 weeks ago - 4 months 3 weeks ago #5 by BlueSkyKnight

Faweks1 wrote: Thank for explanation!
I'm working with BlueSkyDefender's SuperDepth3D shader ( github.com/BlueSkyDefender/Depth3D ), adding frame sequential output (below posted diff for version 2.0.7):
www.diffchecker.com/

Right now if game can hit stable 120FPS with shader ON, with forced frame limiter (120FPS, Limiter V2, VSync OFF) with NVidiaProfileInspector and with windowed borderless fullscreen - everything works as expected. (I know i should save last frame and then use it for right eye image, but this will be fix for later :) )

I think it can be possible to run any game @60FPS with shader ON, but there have to be some sort of frame injection - just to generate 120FPS.
I'm considering now ENB injection + Reshade, where ENB should work on black frame insertion and Reshade will just swap black frame to image of right eye.

Let me rephrase my question then.
Can something like black frame insertion be done by some software implementation or injection via ENB (or something else) ?


Frame Sequential will not work without enabling a specific buffering mode from your GPU. You will lose sync. I already tried this. This is why this option not available on my shader.

To make this work you need a stable 120 output. Even one drop frame will invert the images. But, even dropping a black frame for the dropped frame can be an issue. Since I tested this as well. If you really want this to work you have to modify ReShade to kick your GPU into Quad buffering mode. If you add that, I will add FS to my shader.

You will also run into this issue. nvidia.custhelp.com/app/answers/detail/a...ered-stereo-features

Also if you read the licensing you can't redistribute a modded shader. Like what you did here. Please remove the link to the shader.

You can read about it here. creativecommons.org/licenses/by-nd/4.0/

BTW. It's fine to mod it for your self. Just don't redistribute that modded version.

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

  • Posts: 6
4 months 3 weeks ago - 4 months 3 weeks ago #6 by Faweks1
Thank You for answer. I removed link to diff. I'm now trying different approach with custom bluetooth controller for active shutter glasses so i can specify timing of eye dimming. This can possibly resolve issue with quad buffering and frame dropping as glasses will be switching eyes accordingly to actual FPS.

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

  • Posts: 808
4 months 3 weeks ago - 4 months 3 weeks ago #7 by BlueSkyKnight

Faweks1 wrote: Thank You for answer. I removed link to diff. I'm now trying different approach with custom bluetooth controller for active shutter glasses so i can specify timing of eye dimming. This can possibly resolve issue with quad buffering and frame dropping as glasses will be switching eyes accordingly to actual FPS.


This sounds like the best way to do this. I was going to do this but, Time is an issue for me. If you can work on this. This will be good. I can Update the shader when you are done.

This Idea would also support newer high fps monitors...... So this is the much better way to get it going.

Add a photosensor to the Arduino and place a black and white square on top left of the image.
Black for left and White for Right.

and have it sync to that.

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

  • Posts: 6
4 months 3 weeks ago - 4 months 3 weeks ago #8 by Faweks1

BlueSkyKnight wrote: Add a photosensor to the Arduino and place a black and white square on top left of the image.


I don't want to use any additional hardware except maybe bluetooth USB dongle for people that don't have built-in bluetooth adapter on motherboard.
Main concept is to keep things as generic as possible with Reshade so i'll try to keep doing that and work only with software bluetooth controller implementation.

So in the end anyone with 120Hz monitor, bluetooth and pair of 3d active shutter glasses (with bluetooth sync) can play his favourite game in 3D :)

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