Skip to content

Commit

Permalink
Fix texture lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Miksel12 committed Jan 25, 2021
1 parent caff472 commit 128dddb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Source/Core/VideoCommon/PixelShaderGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,8 @@ static void WriteStage(ShaderCode& out, const pixel_shader_uid_data* uid_data, i
out.Write("\ttevcoord.xy = int2(0, 0);\n");
}
out.Write("\ttextemp = ");
SampleTexture(out, "float2(tevcoord.xy)", texswap, stage.tevorders_texmap, stereo, api_type);
SampleTexture(out, "float2(tevcoord.xy + (1 << 6))", texswap,
stage.tevorders_texmap, stereo, api_type);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/UberShaderPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
" uint sampler_num = {};\n",
BitfieldExtract("ss.order", TwoTevStageOrders().texmap0));
out.Write("\n"
" float2 uv = (float2(tevcoord.xy)) * " I_TEXDIMS "[sampler_num].xy;\n");
" float2 uv = (float2(tevcoord.xy + (1 << 6))) * " I_TEXDIMS "[sampler_num].xy;\n");
out.Write(" int4 color = sampleTexture(sampler_num, float3(uv, {}));\n",
stereo ? "float(layer)" : "0.0");
out.Write(" uint swap = {};\n", BitfieldExtract("ss.ac", TevStageCombiner().alphaC.tswap));
Expand Down

0 comments on commit 128dddb

Please sign in to comment.