mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
gl_shader_decompiler: Fixup inverted if
This commit is contained in:
parent
db3200b515
commit
370980fdc3
1 changed files with 5 additions and 6 deletions
|
@ -2766,22 +2766,21 @@ private:
|
||||||
const bool depth_compare =
|
const bool depth_compare =
|
||||||
instr.texs.UsesMiscMode(Tegra::Shader::TextureMiscMode::DC);
|
instr.texs.UsesMiscMode(Tegra::Shader::TextureMiscMode::DC);
|
||||||
const auto process_mode = instr.texs.GetTextureProcessMode();
|
const auto process_mode = instr.texs.GetTextureProcessMode();
|
||||||
|
|
||||||
UNIMPLEMENTED_IF_MSG(instr.texs.UsesMiscMode(Tegra::Shader::TextureMiscMode::NODEP),
|
UNIMPLEMENTED_IF_MSG(instr.texs.UsesMiscMode(Tegra::Shader::TextureMiscMode::NODEP),
|
||||||
"NODEP is not implemented");
|
"NODEP is not implemented");
|
||||||
|
|
||||||
const auto scope = shader.Scope();
|
const auto scope = shader.Scope();
|
||||||
|
|
||||||
const auto [coord, texture] =
|
auto [coord, texture] =
|
||||||
GetTEXSCode(instr, texture_type, process_mode, depth_compare, is_array);
|
GetTEXSCode(instr, texture_type, process_mode, depth_compare, is_array);
|
||||||
|
|
||||||
shader.AddLine(coord);
|
shader.AddLine(coord);
|
||||||
|
|
||||||
if (!depth_compare) {
|
if (depth_compare) {
|
||||||
shader.AddLine("vec4 texture_tmp = " + texture + ';');
|
texture = "vec4(" + texture + ')';
|
||||||
|
|
||||||
} else {
|
|
||||||
shader.AddLine("vec4 texture_tmp = vec4(" + texture + ");");
|
|
||||||
}
|
}
|
||||||
|
shader.AddLine("vec4 texture_tmp = " + texture + ';');
|
||||||
|
|
||||||
WriteTexsInstruction(instr, "texture_tmp");
|
WriteTexsInstruction(instr, "texture_tmp");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue