diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-08-01 22:57:44 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-08-01 22:57:44 -0500 |
| commit | 7e83a0ea9be49abee3a4c8a2e953ca0905271434 (patch) | |
| tree | 8771892fe1bbbe65ee5341c65e01ce38506b3bcd /Source/Core | |
| parent | b8e64716be8269244a54f4b24037482f2d7a75e2 (diff) | |
| parent | fe9b7fa4f371d1c400afa6274eaf9512681685d6 (diff) | |
Merge pull request #700 from jimbo1qaz/master
Fix D3D Real XFB texture sampling.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/XFBEncoder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp index 8c200b4ab2..215a7e911f 100644 --- a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp @@ -97,7 +97,8 @@ static const char XFB_ENCODE_PS[] = "void main(out float4 ocol0 : SV_Target, in float4 Pos : SV_Position, in float2 Coord : ENCODECOORD)\n" "{\n" - "float2 baseCoord = Coord * float2(2,1);\n" + // Multiplying X by 2, moves pixel centers from (x+0.5) to (2x+1) instead of (2x+0.5), so subtract 0.5 to compensate + "float2 baseCoord = Coord * float2(2,1) - float2(0.5,0);\n" // FIXME: Shall we apply gamma here, or apply it below to the Y components? // Be careful if you apply it to Y! The Y components are in the range (16..235) / 255. "float3 sampleL = pow(abs(SampleEFB(baseCoord+float2(-1,0))), Params.Gamma);\n" // Left |
