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); } 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