rafalh / dashfaction

A community patch for the Red Faction (2001) FPS game
https://www.factionfiles.com/ff.php?action=file&id=6252
Mozilla Public License 2.0
61 stars 11 forks source link

Please add a native stereoscopic mode or a graphical mode that lets ReShade read the depth buffer #239

Open DevilMaster opened 6 months ago

DevilMaster commented 6 months ago

I would love to play ReShade in stereoscopic 3D, as I do with many other games with ReShade and the SuperDepth3D.fx shader. As of now I can't, because if I try, ReShade will not be able to read the depth buffer (it will generate a uniform depth map where everything is either at maximum depth or at screen depth).

This is what I verified.

For this, I'm requesting the addition of either a graphical mode that lets ReShade read the depth buffer, or a native side-by-side stereoscopic mode, where two views (one for each eye) are generated instead of just one. Thank you!

rafalh commented 6 months ago

How does this 3D shader work? Is it something for VR headsets like Meta Quest or maybe you use it with 3d monitors? I wonder if by native you mean implementing support for OpenXR which is something modern headsets support or something maybe else? I got impression that you suggest that game not working with this shader is an unusual thing, but according to https://reshade.me/forum/shader-presentation/2128-3d-depth-map-based-stereoscopic-shader compatibility problems are pretty common. As for now I have no idea what RF does differently from other games and how ReShade accesses the depth buffer so this will be hard to fix without more information..

DevilMaster commented 6 months ago

How does this 3D shader work? Is it something for VR headsets like Meta Quest or maybe you use it with 3d monitors?

This shader is designed to work with 3D monitors. I use it with a homemade headset which the system sees as a monitor anyway. In short, it looks at the depth buffer, and depending on the value, it decides how much to shift a pixel to the left or to the right when it generates the view for an eye. In addition, if the original resolution is e.g. 1920x1080, the shader will output frames with that resolution, composed of two views placed side by side, each of which has been squashed horizontally to half of the original resolution. Then the 3D monitor or headset will restore the views to their original aspect ratio.

For reference, at the URL https://fastupload.io/2TbocravIFi8Fp2/file I uploaded the complete setup of ReShade I use for Rollcage Redux, which is completely supported.

I wonder if by native you mean implementing support for OpenXR which is something modern headsets support or something maybe else?

I actually meant how it's done in GZDoom, where the program itself generates two side-by-side, horizontally squashed, views as part of a single frame (again, meant to be viewed on a 3D monitor). In this case, the two views are not made by processing a single 2D frame depending on the value of the depth buffer, but they are actually generated by rendering the scene from two different points of view. I proposed this as an alternative, in case it was impossible to make Red Faction "play nice" with ReShade.