diff options
| author | Stenzek <stenzek@gmail.com> | 2018-05-03 11:32:06 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2018-05-03 11:32:06 +1000 |
| commit | a93830056fce8fcdb3f176fa58d58946c9aef794 (patch) | |
| tree | e2f86785cef0f6a4d63594744ba3f4eaae7f58ab /Source/Core/VideoCommon/TextureConversionShader.cpp | |
| parent | ef98a2173516c6e3b67362877b7890ae19c978a6 (diff) | |
TextureConversionShader: Fix more implicit conversion errors
Diffstat (limited to 'Source/Core/VideoCommon/TextureConversionShader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureConversionShader.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index 2339558df1..ef2e4eb076 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -158,7 +158,7 @@ static void WriteSampleFunction(char*& p, const EFBCopyParams& params, APIType A else WRITE(p, "Tex0.Sample(samp0, float3("); - WRITE(p, "uv.x + xoffset * pixel_size.x, "); + WRITE(p, "uv.x + float(xoffset) * pixel_size.x, "); // Reverse the direction for OpenGL, since positive numbers are distance from the bottom row. if (yoffset != 0) @@ -257,7 +257,8 @@ static void WriteSwizzler(char*& p, const EFBCopyParams& params, EFBCopyFormat f WRITE(p, " uv0.y = 1.0-uv0.y;\n"); } - WRITE(p, " float2 pixel_size = position.ww / float2(%d, %d);\n", EFB_WIDTH, EFB_HEIGHT); + WRITE(p, " float2 pixel_size = float2(position.w, position.w) / float2(%d, %d);\n", EFB_WIDTH, + EFB_HEIGHT); } static void WriteSampleColor(char*& p, const char* colorComp, const char* dest, int xoffset, |
