From b02a533d946fbf98897ee42334a343d2aa4d7bf4 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 2 Oct 2015 00:12:50 -0400 Subject: gl_shader_util: Use vec3 constants for AppendColorCombiner. --- src/video_core/renderer_opengl/gl_shader_util.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index 2c049e940..8a6a51ad4 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp @@ -268,25 +268,25 @@ void AppendColorCombiner(std::string& shader, Pica::Regs::TevStageConfig::Operat shader += variable_name + "[0] * " + variable_name + "[1]"; break; case Operation::Add: - shader += "min(" + variable_name + "[0] + " + variable_name + "[1], 1.0)"; + shader += "min(" + variable_name + "[0] + " + variable_name + "[1], vec3(1.0))"; break; case Operation::AddSigned: - shader += "clamp(" + variable_name + "[0] + " + variable_name + "[1] - vec3(0.5), 0.0, 1.0)"; + shader += "clamp(" + variable_name + "[0] + " + variable_name + "[1] - vec3(0.5), vec3(0.0), vec3(1.0))"; break; case Operation::Lerp: shader += variable_name + "[0] * " + variable_name + "[2] + " + variable_name + "[1] * (vec3(1.0) - " + variable_name + "[2])"; break; case Operation::Subtract: - shader += "max(" + variable_name + "[0] - " + variable_name + "[1], 0.0)"; + shader += "max(" + variable_name + "[0] - " + variable_name + "[1], vec3(0.0))"; break; case Operation::MultiplyThenAdd: - shader += "min(" + variable_name + "[0] * " + variable_name + "[1] + " + variable_name + "[2], 1.0)"; + shader += "min(" + variable_name + "[0] * " + variable_name + "[1] + " + variable_name + "[2], vec3(1.0))"; break; case Operation::AddThenMultiply: - shader += "min(" + variable_name + "[0] + " + variable_name + "[1], 1.0) * " + variable_name + "[2]"; + shader += "min(" + variable_name + "[0] + " + variable_name + "[1], vec3(1.0)) * " + variable_name + "[2]"; break; default: - shader += "0.0"; + shader += "vec3(0.0)"; LOG_CRITICAL(Render_OpenGL, "Unknown color comb op %u", operation); break; } -- cgit v1.2.3