summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-11 17:18:27 +0100
committerGitHub <noreply@github.com>2018-11-11 17:18:27 +0100
commit1916213311f2b762f37edb1f4a4be0b4bba9ebc1 (patch)
tree26aa55f6307d6fdd3b1b4e3f831cd2c41a865dcc /src/video_core/renderer_opengl
parentMerge pull request #1654 from degasus/dirty_flags (diff)
parentCorrect issue where texturelod could not be applied to 2darrayshadow (diff)
downloadyuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar.gz
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar.bz2
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar.lz
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar.xz
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.tar.zst
yuzu-1916213311f2b762f37edb1f4a4be0b4bba9ebc1.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 09b003c59..f6a879a7b 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -2742,12 +2742,12 @@ private:
}
case 3: {
if (is_array) {
- UNIMPLEMENTED_MSG("3-coordinate arrays not fully implemented");
- const std::string x = regs.GetRegisterAsFloat(instr.gpr8);
- const std::string y = regs.GetRegisterAsFloat(instr.gpr20);
- coord = "vec2 coords = vec2(" + x + ", " + y + ");";
- texture_type = Tegra::Shader::TextureType::Texture2D;
- is_array = false;
+ const std::string index = regs.GetRegisterAsInteger(instr.gpr8);
+ const std::string x = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
+ const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 2);
+ const std::string z = regs.GetRegisterAsFloat(instr.gpr20);
+ coord =
+ "vec4 coords = vec4(" + x + ", " + y + ", " + z + ", " + index + ");";
} else {
const std::string x = regs.GetRegisterAsFloat(instr.gpr8);
const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
@@ -2777,7 +2777,11 @@ private:
break;
}
case Tegra::Shader::TextureProcessMode::LZ: {
- texture = "textureLod(" + sampler + ", coords, 0.0)";
+ if (depth_compare && is_array) {
+ texture = "texture(" + sampler + ", coords)";
+ } else {
+ texture = "textureLod(" + sampler + ", coords, 0.0)";
+ }
break;
}
case Tegra::Shader::TextureProcessMode::LL: {