summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
diff options
context:
space:
mode:
authorDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-12-14 13:42:45 +0100
committerDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-12-14 13:42:45 +0100
commit21ac9aa715d7bfc24e52474c2511892ed4ad6ac8 (patch)
tree5f0bbfc8bb3ee85a9210b1ef7e6a25d203e83b93 /Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
parent5aa1d4733d30c2779bd857940699c01d079fe80f (diff)
parent6c7bed25a541a3093a9e9e6c43751b34592e42c0 (diff)
Merge pull request #1612 from Armada651/d3d-stereo-3d
D3D: Add geometry shader stereoscopy support.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
index 09f124ecc6..fcc40cc9e5 100644
--- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
@@ -100,7 +100,7 @@ static const char EFB_ENCODE_PS[] =
"} Params;\n"
"}\n"
-"Texture2D EFBTexture : register(t0);\n"
+"Texture2DArray EFBTexture : register(t0);\n"
"sampler EFBSampler : register(s0);\n"
// Constants
@@ -183,7 +183,7 @@ static const char EFB_ENCODE_PS[] =
"float4 Fetch_0(float2 coord)\n"
"{\n"
"float2 texCoord = CalcTexCoord(coord);\n"
- "float4 result = EFBTexture.Sample(EFBSampler, texCoord);\n"
+ "float4 result = EFBTexture.Sample(EFBSampler, float3(texCoord.xy, 0.0));\n"
"result.a = 1.0;\n"
"return result;\n"
"}\n"
@@ -191,13 +191,13 @@ static const char EFB_ENCODE_PS[] =
"float4 Fetch_1(float2 coord)\n"
"{\n"
"float2 texCoord = CalcTexCoord(coord);\n"
- "return EFBTexture.Sample(EFBSampler, texCoord);\n"
+ "return EFBTexture.Sample(EFBSampler, float3(texCoord.xy, 0.0));\n"
"}\n"
"float4 Fetch_2(float2 coord)\n"
"{\n"
"float2 texCoord = CalcTexCoord(coord);\n"
- "float4 result = EFBTexture.Sample(EFBSampler, texCoord);\n"
+ "float4 result = EFBTexture.Sample(EFBSampler, float3(texCoord.xy, 0.0));\n"
"result.a = 1.0;\n"
"return result;\n"
"}\n"
@@ -206,7 +206,7 @@ static const char EFB_ENCODE_PS[] =
"{\n"
"float2 texCoord = CalcTexCoord(coord);\n"
- "uint depth24 = 0xFFFFFF * EFBTexture.Sample(EFBSampler, texCoord).r;\n"
+ "uint depth24 = 0xFFFFFF * EFBTexture.Sample(EFBSampler, float3(texCoord.xy, 0.0)).r;\n"
"uint4 bytes = uint4(\n"
"(depth24 >> 16) & 0xFF,\n" // r
"(depth24 >> 8) & 0xFF,\n" // g