diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-11-22 19:56:59 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-12-14 13:28:46 +0100 |
| commit | 799697ad8095fcb364bdbd5e9c49a8adb8beda8d (patch) | |
| tree | 4deff893bbc209292cd7795d702beee1b8047390 /Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | |
| parent | ced733ccdfcb52cc35b71d0a3365798bfea43a23 (diff) | |
PSTextureEncoder: Add texture array support.
We only read the first slice, because EFB2RAM doesn't support texture arrays.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | 10 |
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..be0e6461e8 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));\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));\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));\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)).r;\n" "uint4 bytes = uint4(\n" "(depth24 >> 16) & 0xFF,\n" // r "(depth24 >> 8) & 0xFF,\n" // g |
