From bd833b8dd8b872833a6867266da4d61f058e340f Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 7 Oct 2015 21:01:28 -0400 Subject: gl_shader_gen: Fix bug where TEV stage outputs should be clamped. --- src/video_core/renderer_opengl/gl_shader_gen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 5093710d4..74f0d4805 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -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)) -- cgit v1.2.3