Skip to content

Commit

Permalink
Fix UV offsets in 16->32 reinterpret. Better, but something is still …
Browse files Browse the repository at this point in the history
…not quite right.
  • Loading branch information
hrydgard committed Aug 27, 2022
1 parent 8d1157e commit 869bd16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Common/ReinterpretFramebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ Draw2DPipelineInfo GenerateReinterpretFragmentShader(ShaderWriter &writer, GEBuf
} else if (IsBufferFormat16Bit(from) && !IsBufferFormat16Bit(to)) {
// 16-to-32-bit (two pixels, draw size is halved)

writer.C(" vec4 valLeft = ").SampleTexture2D("tex", "v_texcoord.xy").C(";\n");
writer.C(" vec4 valRight = ").SampleTexture2D("tex", "v_texcoord.xy + vec2(0.5 / texSize.x, 0.0)").C(";\n");
writer.C(" vec4 valLeft = ").SampleTexture2D("tex", "v_texcoord.xy + vec2(-0.25 / texSize.x, 0.0)").C(";\n");
writer.C(" vec4 valRight = ").SampleTexture2D("tex", "v_texcoord.xy + vec2(0.25 / texSize.x, 0.0)").C(";\n");
writer.C(" vec4 outColor = unpackColor(packColor(valLeft), packColor(valRight));\n");

_assert_("not yet implemented");
Expand Down

0 comments on commit 869bd16

Please sign in to comment.