From b087087cff386552572cd42feec93d649203c7d5 Mon Sep 17 00:00:00 2001 From: huangrunlai Date: Sat, 11 May 2019 23:23:45 +1000 Subject: [PATCH 1/2] Solved error when loading the effect --- Depth.fxsub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Depth.fxsub b/Depth.fxsub index 5c13f73..f92415c 100644 --- a/Depth.fxsub +++ b/Depth.fxsub @@ -16,7 +16,7 @@ void DepthObjectVS( out float3 oTexcoord : TEXCOORD0, out float4 oPosition : POSITION) { - oTexcoord = float3(Texcoord.xy, oPosition.w); + oTexcoord = float3(Texcoord.xy, Position.w); oPosition = mul(Position, matWorldViewProject); } From 00673cffe1fd209a1883d26b52ddbbba0142de65 Mon Sep 17 00:00:00 2001 From: huangrunlai Date: Sat, 11 May 2019 23:27:54 +1000 Subject: [PATCH 2/2] Fixed width error for Horizontal mode and height error for Vertical mode --- stereoscopic.fxsub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stereoscopic.fxsub b/stereoscopic.fxsub index d3d70b5..f675ffe 100644 --- a/stereoscopic.fxsub +++ b/stereoscopic.fxsub @@ -23,9 +23,9 @@ float4 ComputeStereoCoord(sampler depth, float2 coord, float maxSeparation, floa float4 StereoscopicPS(float2 tex : TEXCOORD0, uniform sampler source, uniform sampler depth) : COLOR { #if POST_STEREOSCOPIC_MODE == 4 - float2 coord = tex.x < 0.5 ? tex * float2(2,1) : float2((tex.x - 0.5f) * 2, tex.y); + float2 coord = tex.x < 0.5 ? float2((tex.x + 0.25f), tex.y) : float2((tex.x - 0.25f), tex.y); #elif POST_STEREOSCOPIC_MODE == 5 - float2 coord = tex.y < 0.5 ? tex * float2(1,2) : float2(tex.x, (tex.y - 0.5f) * 2); + float2 coord = tex.y < 0.5 ? float2(tex.x, (tex.y + 0.25f)) : float2(tex.x, (tex.y - 0.25f)); #else float2 coord = tex; #endif