浏览代码

Shaders: Fixed the coords in TEX with Texture2D.

The X and Y coordinates should be in gpr8 and gpr8+1, respectively.

This fixes the cutscene rendering in Sonic Mania.
Subv 8 年之前
父节点
当前提交
eac3cf301c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

+ 1 - 1
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -1514,7 +1514,7 @@ private:
                 switch (instr.tex.texture_type) {
                 switch (instr.tex.texture_type) {
                 case Tegra::Shader::TextureType::Texture2D: {
                 case Tegra::Shader::TextureType::Texture2D: {
                     std::string x = regs.GetRegisterAsFloat(instr.gpr8);
                     std::string x = regs.GetRegisterAsFloat(instr.gpr8);
-                    std::string y = regs.GetRegisterAsFloat(instr.gpr20);
+                    std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
                     coord = "vec2 coords = vec2(" + x + ", " + y + ");";
                     coord = "vec2 coords = vec2(" + x + ", " + y + ");";
                     break;
                     break;
                 }
                 }