Side by side rendering

- Side by side rendering implemented throughout the graphics pipeline.
- New GuiTSCtrl renderStyle property is set to "stereo side by side" to
activate.
- You set an IDisplayDevice on the GameConnection to define any vertical
FOV, projection offset, and stereo eye offset properties required for
the stereo rendering (no display device included with this commit).
- Full and Empty templates updated with correct scripts and shaders.
This commit is contained in:
DavidWyand-GG 2013-04-09 15:19:18 -04:00
parent b1feed56fd
commit b32e7688c2
28 changed files with 465 additions and 41 deletions

View file

@ -58,8 +58,9 @@ singleton PostEffect( LightRayPostFX )
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterDiffuse";
renderPriority = 0.1;
renderTime = "PFXBeforeBin";
renderBin = "EditorBin";
renderPriority = 10;
shader = LightRayOccludeShader;
stateBlock = LightRayStateBlock;

View file

@ -89,6 +89,14 @@ struct VertexIn_PNT
float2 uv0 : TEXCOORD0;
};
struct VertexIn_PNTT
{
float4 pos : POSITION;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float2 uv0 : TEXCOORD0;
};
struct VertexIn_PNCT
{
float4 pos : POSITION;

View file

@ -24,7 +24,7 @@
#include "farFrustumQuad.hlsl"
FarFrustumQuadConnectV main( VertexIn_PNT IN,
FarFrustumQuadConnectV main( VertexIn_PNTT IN,
uniform float4 rtParams0 )
{
FarFrustumQuadConnectV OUT;
@ -36,7 +36,7 @@ FarFrustumQuadConnectV main( VertexIn_PNT IN,
// Interpolators will generate eye rays the
// from far-frustum corners.
OUT.wsEyeRay = IN.pos.xyz;
OUT.wsEyeRay = IN.tangent.xyz;
OUT.vsEyeRay = IN.normal.xyz;
return OUT;

View file

@ -73,7 +73,7 @@ float4 main( FarFrustumQuadConnectP IN,
// Use eye ray to get ws pos
float4 worldPos = float4(eyePosWorld + IN.wsEyeRay * depth, 1.0f);
// Get the light attenuation.
float dotNL = dot(-lightDirection, normal);

View file

@ -58,8 +58,9 @@ singleton PostEffect( LightRayPostFX )
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterDiffuse";
renderPriority = 0.1;
renderTime = "PFXBeforeBin";
renderBin = "EditorBin";
renderPriority = 10;
shader = LightRayOccludeShader;
stateBlock = LightRayStateBlock;

View file

@ -89,6 +89,14 @@ struct VertexIn_PNT
float2 uv0 : TEXCOORD0;
};
struct VertexIn_PNTT
{
float4 pos : POSITION;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float2 uv0 : TEXCOORD0;
};
struct VertexIn_PNCT
{
float4 pos : POSITION;

View file

@ -24,7 +24,7 @@
#include "farFrustumQuad.hlsl"
FarFrustumQuadConnectV main( VertexIn_PNT IN,
FarFrustumQuadConnectV main( VertexIn_PNTT IN,
uniform float4 rtParams0 )
{
FarFrustumQuadConnectV OUT;
@ -36,7 +36,7 @@ FarFrustumQuadConnectV main( VertexIn_PNT IN,
// Interpolators will generate eye rays the
// from far-frustum corners.
OUT.wsEyeRay = IN.pos.xyz;
OUT.wsEyeRay = IN.tangent.xyz;
OUT.vsEyeRay = IN.normal.xyz;
return OUT;

View file

@ -73,7 +73,7 @@ float4 main( FarFrustumQuadConnectP IN,
// Use eye ray to get ws pos
float4 worldPos = float4(eyePosWorld + IN.wsEyeRay * depth, 1.0f);
// Get the light attenuation.
float dotNL = dot(-lightDirection, normal);