yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

gl_shader_gen: Fix bug where TEV stage outputs should be clamped.

This commit is contained in:
bunnei 2015-10-07 21:01:28 -04:00
parent f2e7f7e101
commit bd833b8dd8
1 changed files with 3 additions and 3 deletions

View File

@ -307,9 +307,9 @@ static void WriteTevStage(std::string& out, const ShaderCacheKey& config, unsign
AppendAlphaCombiner(out, stage.alpha_op, "alpha_results_" + index_name);
out += ";\n";
out += "g_last_tex_env_out = vec4(min(color_output_" + index_name + " * " +
std::to_string(stage.GetColorMultiplier()) + ".0, 1.0), min(alpha_output_" + index_name + " * " +
std::to_string(stage.GetAlphaMultiplier()) + ".0, 1.0));\n";
out += "g_last_tex_env_out = vec4("
"clamp(color_output_" + index_name + " * " + std::to_string(stage.GetColorMultiplier()) + ".0, 0.0, 1.0),"
"clamp(alpha_output_" + index_name + " * " + std::to_string(stage.GetAlphaMultiplier()) + ".0, 0.0, 1.0));\n";
}
if (config.TevStageUpdatesCombinerBufferColor(index))