summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-10-02 06:12:50 +0200
committerbunnei <bunneidev@gmail.com>2015-10-22 03:51:24 +0200
commitb02a533d946fbf98897ee42334a343d2aa4d7bf4 (patch)
tree7762cfd27d5b7904593eecdead75abf35a4640d9 /src
parentgl_rasterizer: Fix typo in uploading TEV const color uniforms. (diff)
downloadyuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar.gz
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar.bz2
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar.lz
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar.xz
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.tar.zst
yuzu-b02a533d946fbf98897ee42334a343d2aa4d7bf4.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_util.cpp12
1 files changed, 6 insertions, 6 deletions
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;
}