Stereoscopic 3D using Reprojection

Research Project

Screenshot previewAs part of a research project in our Game & Media Technology master, Bas Zalmstra and I developed a very fast technique to generate a stereoscopic image pair from a 2D image with depth information.

The technique uses reprojection to transform the 2D image into a stereoscopic image pair. Our implementation is very fast on current graphics hardware and generates high quality stereoscopic images. Our benchmark shows an execution time of less than 1 ms on mid-range hardware.

Our results are very similar to the results Crytek has claimed with their ScreenSpace Reprojection Stereo technique (SSRS). However, the approach of their algorithm seems to be different.

Research paper

The technique is thoroughly explained in our research paper. The paper also includes benchmarks and a quality analysis. It can be downloaded here:

Fast Gather-based Construction of Stereoscopic Images Using Reprojection
Revision 1

Shader implementation

The shader is written in Cg. It can be used for any purpose under the relaxed conditions mentioned in the shader file.

Reprojection Shader
Revision 2

Demo

We made a demo which is a perfect tool to test the technique. It enables real-time switching between the reprojection technique and the rendering twice approach. Furthermore, a lot of variables can be adjusted in real-time and some debug views are available. The Sponza Atrium model by Crytek is used.

Stereoscopic 3D Reprojection Demo
Revision 1

System requirements: Windows (32 or 64 bit), OpenGL 3.1 support, Microsoft Visual C++ 2010 redistributable.

Screenshots

All screenshots are created with the fast reprojection technique.

3 thoughts on “Stereoscopic 3D using Reprojection”

  1. Very minor optimisation:

    The step in the vertex shader:
    rayDirection /= rayDirection.w;
    can be omitted, as it has no effect on the final vout.rayDirection

    1. Thanks!
      You’re right, the result is only used in the line
      vout.rayDirection = rayDirection.x / rayDirection.z;
      which cancels out the perspective division.

      The shader file is updated with the change.

  2. I ported the Crysis 3 Code over to Reshade HLSL. Also got it working with some modifications to the depth buffer before it’s intercepted. This give the Depth more of a softer Mat look and mask the Halo affect a bit.

Leave a Reply

Your email address will not be published. Required fields are marked *