3D Depth Map Based Stereoscopic Shader
- mr_spongeworthy
Please Log in or Create an account to join the conversation.
- Devil Master
Just today I used DosBox SVN-Daum (a port that can use Direct3D and OpenGL as possible output APIs, so ReShade would be able to hook into it) to run a DOS game with native, albeit limited, stereoscopy support: LameDuke . This alpha version of Duke Nukem 3D, released in 1997 but compiled in 1994, contains a video mode that was originally intended to be used with the CrystalEyes shutterglasses: the game would first render the EVEN lines, containing the left view, and the glasses would darken the right lens. Then, the game would draw the ODD lines, containing the right view, and the glasses would switch, darkening the left lens.
Unlike the original distribution, where the CrystalEyes mode does not work at all, DosBox SVN-Daum can render such a scene as an over/under stereo pair, so the demo at the beginning of the game looks like this:
As you can see, the right view starts at at a height of 256 pixels, instead of 240 like it's supposed to. I know this is a bug of the original executable, but I was wondering if a shader could be written for ReShade that compensates that. One that takes a horizontal strip from the original output (letting the user specify how many lines) and displays it at a different height (letting the user specify where).
So, could it be done?
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Devil Master wrote: Okay, this is only related to stereoscopy, and not to the SuperDepth3D.fx shader per se, but I need to ask whether ReShade and a custom shader could be used to solve this problem.
Just today I used DosBox SVN-Daum (a port that can use Direct3D and OpenGL as possible output APIs, so ReShade would be able to hook into it) to run a DOS game with native, albeit limited, stereoscopy support: LameDuke . This alpha version of Duke Nukem 3D, released in 1997 but compiled in 1994, contains a video mode that was originally intended to be used with the CrystalEyes shutterglasses: the game would first render the EVEN lines, containing the left view, and the glasses would darken the right lens. Then, the game would draw the ODD lines, containing the right view, and the glasses would switch, darkening the left lens.
Unlike the original distribution, where the CrystalEyes mode does not work at all, DosBox SVN-Daum can render such a scene as an over/under stereo pair, so the demo at the beginning of the game looks like this:
As you can see, the right view starts at at a height of 256 pixels, instead of 240 like it's supposed to. I know this is a bug of the original executable, but I was wondering if a shader could be written for ReShade that compensates that. One that takes a horizontal strip from the original output (letting the user specify how many lines) and displays it at a different height (letting the user specify where).
So, could it be done?
If all you need is to move the top or bottom moved up or down. I guess that can be done. I also have some questions.
Come over to the Discord Server so I can pass you this one-time shader.
Please Log in or Create an account to join the conversation.
- Dego Locc
So far the only game I got to work was gta v, it's awesome, plus a FOV mod to help see the UI.
I was wondering if anyone had the presets for games like counter strike GO, Left for dead 1 and 2, and arma 2 and 3, and Escape from Tarkov.. Also I wondered if reshade triggered bans for any of those games while playing online. Thanks!
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Dego Locc wrote: Hey thanks for making this awesome shader, I am using it on my PSVR!
So far the only game I got to work was gta v, it's awesome, plus a FOV mod to help see the UI.
I was wondering if anyone had the presets for games like counter strike GO, Left for dead 1 and 2, and arma 2 and 3, and Escape from Tarkov.. Also I wondered if reshade triggered bans for any of those games while playing online. Thanks!
Reshade blocks access to the depth buffer in online games. I guess you can play most of your games listed in Offline mode. But, I don't think you are looking for that. It should not trigger a ban. In most online games.
Please Log in or Create an account to join the conversation.
- Dego Locc
Please Log in or Create an account to join the conversation.
- Devil Master
BlueSkyKnight has been kind enough to provide me with a custom shader that lets the user move and resize part of the image, so, whenever an MS-DOS game (run through DosBox SVN-Daum) has a native stereoscopic mode that doesn't look quite right, his shader can compensate for the original flaws and let the game be enjoyed in 3D!
I made a package (download here ) that includes DosBox SVN-Daum, the latest version of ReShade, the new shader, three configurations, three batch files that will let you launch LameDuke, Hi-Octane or Magic Carpet with the correct configuration, as well as LameDuke which is freeware. I have not included the other two games because of copyright, but if you have them, you will be able to patch them for stereoscopy with the patches provided here .
To play them, just unzip the package anywhere, set your desktop resolution to 720p (that's how I set the configurations, although you can change them) and run the corresponding batch file.
And now, some screenshots.
Magic Carpet
Hi-Octane
LameDuke
Please Log in or Create an account to join the conversation.
- luthis
My only issue is everything is really tall and thin. Weird persistent horizontal squeeze.
I tried different resolutions and settings but I couldn't get it to look normal!
I'm sure I'm missing something really really simple, Can anyone help me re-live Morrowind in 3D?
Cheers!
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
luthis wrote: This works great!
My only issue is everything is really tall and thin. Weird persistent horizontal squeeze.
I tried different resolutions and settings but I couldn't get it to look normal!
I'm sure I'm missing something really really simple, Can anyone help me re-live Morrowind in 3D?
Cheers!
What mods are you using for Morrowind or are you playing the game vanilla?
Please Log in or Create an account to join the conversation.
- Devil Master
Could you post some screenshots?luthis wrote: This works great!
My only issue is everything is really tall and thin. Weird persistent horizontal squeeze.
I tried different resolutions and settings but I couldn't get it to look normal!
I'm sure I'm missing something really really simple, Can anyone help me re-live Morrowind in 3D?
Cheers!
Please Log in or Create an account to join the conversation.
- BJensie
Hi again! I've been following your development and have seen new shader files poping up every now and then. Presently these shaders are in the Experimental folder:
3DToElse.fx
DLAA.fx
Depth Cues.fx
Depth_Tool.fx
Polynomial_Barrel_Distortion_v1.3.fx
Smart_Sharp.fx
SuperDepth3D_Wowvx_FS_.fx
SuperDepth3D_v1.9.9.fx
I have a request. It would be nice if you could add a ReadMe file in the Experimental folder with a short description of the various shaders in there and maybe also telling when to use them. Thanx in advance!
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
BJensie wrote: @BlueSkyKnight
Hi again! I've been following your development and have seen new shader files poping up every now and then. Presently these shaders are in the Experimental folder:
3DToElse.fx
DLAA.fx
Depth Cues.fx
Depth_Tool.fx
Polynomial_Barrel_Distortion_v1.3.fx
Smart_Sharp.fx
SuperDepth3D_Wowvx_FS_.fx
SuperDepth3D_v1.9.9.fx
I have a request. It would be nice if you could add a ReadMe file in the Experimental folder with a short description of the various shaders in there and maybe also telling when to use them. Thanx in advance!
I will do this when I have time.
Please Log in or Create an account to join the conversation.
- BJensie
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
BJensie wrote: Thank you BlueSkyKnight! I can see you already did it, really nice! Any plan on filling the Wiki at GitHub later on? Then both code and documentation in the same place, would be nice too.
What Wiki at GitHub? I do not know about this.
Please Log in or Create an account to join the conversation.
- thalixte
BJensie wrote: Thank you BlueSkyKnight! I can see you already did it, really nice! Any plan on filling the Wiki at GitHub later on? Then both code and documentation in the same place, would be nice too.
Markdown language in readme.md already does the tuff. Why do you need documentation in a wiki ? Do you want him to upload screenshots, or something else ?
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
- thalixte
crosire wrote: GitHub Wiki is basically just a collection of markdown files with easier browsing. See help.github.com/articles/about-github-wikis/ .
Thks for the info . Have you take a look at the pull request i made on reshade ?
Please Log in or Create an account to join the conversation.
- Devil Master
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Devil Master wrote: I just noticed that Doom (2016) can be played in stereoscopy if run at 720p (the depth map shows up correctly), but there is no stereoscopic effect if played at 1080p (the depth map is either all white or all black, depending on which you choose). Is this a known problem? Is there a fix?
Ok using reshade 3.0.8 I notice if you change the res in the game from 720p to 1080p you would need to restart the game. So that the Depth Buffer come up properly.
Also make sure your resolution scale is set to 100% You need 1:1 so that the depth is shown properly in most games.
Please Log in or Create an account to join the conversation.
- Devil Master
As for another issue: how do I activate barrel distortion in the newer versions of the shader? Just today I assembled a homemade HMD which uses a single display and strong lenses, so I need barrel distortion. The option is present in the older versions, but it's gone in the more recent ones (the ones that support eDuke32 and Rez Infinite). Is there a separate shader that does the same thing now?
EDIT: scratch the part about the barrel distortion. I experimented with the 3D Image Adjuster shader I used for LameDuke, Magic Carpet and Hi-Octane, and discovered I get better results with that, than with the barrel distortion option. There is a slight amount of distortion in the opposite direction (pincushion), but it's MUCH less noticeable than the barrel distortion.
Please Log in or Create an account to join the conversation.