From 90b54bbaa6745f7fad58de9c5d641e6654f87eb7 Mon Sep 17 00:00:00 2001 From: sephiroth99 Date: Thu, 10 Mar 2016 00:47:22 -0500 Subject: [PATCH] Fix usage of mix in fragment shader The boolean value must be a vector too, where each bool component selects whether the value of the output vector component is from the first or the second source vector. --- src/xenia/gpu/glsl_shader_translator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/glsl_shader_translator.cc b/src/xenia/gpu/glsl_shader_translator.cc index cf7b9e1a9..8adf212fc 100644 --- a/src/xenia/gpu/glsl_shader_translator.cc +++ b/src/xenia/gpu/glsl_shader_translator.cc @@ -360,7 +360,8 @@ void main() { // May need a usage map? for (int i = 0; i < kMaxInterpolators; i++) { EmitSource( - " r[%d] = mix(r[%d], ps_param_gen, state.ps_param_gen == %d);\n", + " r[%d] = mix(r[%d], ps_param_gen, bvec4(state.ps_param_gen == " + "%d));\n", i, i, i); }