Skip to content

Stereo3D

Chuck Walbourn edited this page Jul 13, 2017 · 9 revisions

Stereo3DMatrixHelper.h/.cpp contains a prototype set of functions for creating Stereo 3D projections. It was never fully validated or completed, but might be a useful starting point.

Functions

This function filled out a default STEREO_PARAMETERS which you could then modify before passing on to the other functions.

void StereoCreateDefaultParameters(STEREO_PARAMETERS& stereoParameters);

These functions compute the stereo projection matrices. You'd call it twice, once for STEREO_CHANNEL_LEFT and once for STEREO_CHANNEL_RIGHT to get two matrices. If you pass nullptr for the pStereoParameters parameter, you get the values obtained from StereoCreateDefaultParameters.

XMMATRIX StereoProjectionFovLH(const STEREO_PARAMETERS* pStereoParameters,
    STEREO_CHANNEL Channel,
    float FovAngleY, float AspectRatio, float NearZ, float FarZ,
    STEREO_MODE StereoMode = STEREO_MODE_NORMAL);

XMMATRIX StereoProjectionFovRH(const STEREO_PARAMETERS* pStereoParameters,
    STEREO_CHANNEL Channel,
    float FovAngleY, float AspectRatio, float NearZ, float FarZ,
    STEREO_MODE StereoMode = STEREO_MODE_NORMAL);

Remarks

A simplified version of this header was shipped in the Windows 8.1 Store app Direct3D stereoscopic 3D sample.

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 7 Service Pack 1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v16
  • GCC 9.4, 11.3
  • MinGW 12.2, 13.2
  • Intel Classic Compiler
  • Intel oneAPI Compiler

Related Projects

DirectX Tool Kit for DirectX 11

DirectX Tool Kit for DirectX 12

DirectXMesh

DirectXTex

Tools

Test Suite

See also

DirectX Landing Page

Clone this wiki locally