3D Depth Map Based Stereoscopic Shader

  • mr_spongeworthy
More
7 years 8 months ago - 7 years 8 months ago #1261 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
Any thoughts on attracting Crossire's attention to the games that don't get a depthmap? Just tried it with PCars 2 and no luck, I can get 3D up until the moment the race starts, and then *bam* it's totally flat. It's too bad, since it looks great right up to that point. If there is something Crossire can do about it that would be fantastic, as this project is definitely good enough that it warrants attention.
Last edit: 7 years 8 months ago by mr_spongeworthy.

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

  • Devil Master
More
7 years 8 months ago #1262 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
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?

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

  • BlueSkyKnight
  • Topic Author
More
7 years 8 months ago - 7 years 8 months ago #1263 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
Last edit: 7 years 8 months ago by BlueSkyKnight.
The following user(s) said Thank You: Devil Master

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

  • Dego Locc
More
7 years 8 months ago - 7 years 8 months ago #1264 by Dego Locc Replied by Dego Locc on topic 3D Depth Map Based Stereoscopic Shader
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!
Last edit: 7 years 8 months ago by Dego Locc.

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

  • BlueSkyKnight
  • Topic Author
More
7 years 8 months ago - 7 years 8 months ago #1265 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
Last edit: 7 years 8 months ago by BlueSkyKnight.

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

  • Dego Locc
More
7 years 8 months ago #1266 by Dego Locc Replied by Dego Locc on topic 3D Depth Map Based Stereoscopic Shader
Ah so I would need something like Vorpx for that then?

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

  • Devil Master
More
7 years 8 months ago - 7 years 8 months ago #1267 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
Okay, it's time to let the world know. If you have a device that supports side-by-side and top-and-bottom stereo modes, you can now play at least three MS-DOS games in stereoscopy! Those games are LameDuke, Magic Carpet and Hi-Octane.

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
Last edit: 7 years 8 months ago by Devil Master.
The following user(s) said Thank You: BlueSkyKnight

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

  • luthis
More
7 years 8 months ago #1268 by luthis Replied by luthis on topic 3D Depth Map Based Stereoscopic Shader
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.

  • BlueSkyKnight
  • Topic Author
More
7 years 8 months ago #1269 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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
More
7 years 7 months ago #1270 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader

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!

Could you post some screenshots?

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

  • BJensie
More
7 years 7 months ago - 7 years 7 months ago #1271 by BJensie Replied by BJensie on topic 3D Depth Map Based Stereoscopic Shader
@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!
Last edit: 7 years 7 months ago by BJensie.

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

  • BlueSkyKnight
  • Topic Author
More
7 years 7 months ago #1272 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
The following user(s) said Thank You: thalixte

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

  • BJensie
More
7 years 7 months ago #1273 by BJensie Replied by BJensie on topic 3D Depth Map Based Stereoscopic Shader
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.

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

  • BlueSkyKnight
  • Topic Author
More
7 years 7 months ago #1274 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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
More
7 years 7 months ago #1275 by thalixte Replied by thalixte on topic 3D Depth Map Based Stereoscopic Shader

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
More
7 years 7 months ago #1276 by crosire Replied by crosire on topic 3D Depth Map Based Stereoscopic Shader
GitHub Wiki is basically just a collection of markdown files with easier browsing. See help.github.com/articles/about-github-wikis/ .

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

  • thalixte
More
7 years 7 months ago - 7 years 7 months ago #1277 by thalixte Replied by thalixte on topic 3D Depth Map Based Stereoscopic Shader

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 ?
Last edit: 7 years 7 months ago by thalixte.

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

  • Devil Master
More
7 years 6 months ago #1278 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
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?

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

  • BlueSkyKnight
  • Topic Author
More
7 years 6 months ago - 7 years 6 months ago #1279 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
Last edit: 7 years 6 months ago by BlueSkyKnight.
The following user(s) said Thank You: Devil Master

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

  • Devil Master
More
7 years 6 months ago - 7 years 6 months ago #1280 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
Thank you, it was really that easy. However, I noticed that this doesn't happen with Cemu. I remember what you explained about graphicsPacks, so I took the one I used to play Pokken Tournament at 720p and made another one, where I replaced all occurrences of "1280" and "720" with "1920" and "1080". Only... it doesn't work! There is no stereoscopic effect, and the depth maps are either all black or all white. Quitting and restarting the emulator doesn't help. How do I solve? (EDIT: just in case it needs to be said: yes, I activate the correct pack when I run the game at another resolution)

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.
Last edit: 7 years 6 months ago by Devil Master.

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