diff options
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 0bba8fa5a..a279599ef 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -3003,12 +3003,12 @@ private: | |||
| 3003 | // TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction. | 3003 | // TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction. |
| 3004 | const std::string sampler = GetSampler( | 3004 | const std::string sampler = GetSampler( |
| 3005 | instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare); | 3005 | instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare); |
| 3006 | if (!depth_compare) { | 3006 | if (depth_compare) { |
| 3007 | shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");"); | ||
| 3008 | } else { | ||
| 3009 | // Note: TLD4S coordinate encoding works just like TEXS's | 3007 | // Note: TLD4S coordinate encoding works just like TEXS's |
| 3010 | const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1); | 3008 | const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1); |
| 3011 | shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");"); | 3009 | shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");"); |
| 3010 | } else { | ||
| 3011 | shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");"); | ||
| 3012 | } | 3012 | } |
| 3013 | 3013 | ||
| 3014 | std::string texture = "textureGather(" + sampler + ", coords, " + | 3014 | std::string texture = "textureGather(" + sampler + ", coords, " + |