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.
This commit is contained in:
sephiroth99 2016-03-10 00:47:22 -05:00
parent d52d2c4837
commit 90b54bbaa6
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}