Skip to content

Commit

Permalink
TextureConversionShader: Fix more implicit conversion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed May 3, 2018
1 parent ef98a21 commit a938300
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/VideoCommon/TextureConversionShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a938300

Please sign in to comment.