compositor: Don't just update uniforms when we change shaders
The uniforms change from surface to surface or output to output, so always
set them.
diff --git a/src/compositor.c b/src/compositor.c
index b404dfa..1fe90cd 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -699,15 +699,18 @@
if (ec->current_shader != es->shader) {
glUseProgram(es->shader->program);
- glUniformMatrix4fv(es->shader->proj_uniform,
- 1, GL_FALSE, output->matrix.d);
- if (es->shader->tex_uniform != GL_NONE)
- glUniform1i(es->shader->tex_uniform, 0);
- if (es->shader->color_uniform != GL_NONE)
- glUniform4fv(es->shader->color_uniform,1, es->color);
ec->current_shader = es->shader;
}
+ glUniformMatrix4fv(es->shader->proj_uniform,
+ 1, GL_FALSE, output->matrix.d);
+
+ if (es->shader->tex_uniform != GL_NONE)
+ glUniform1i(es->shader->tex_uniform, 0);
+
+ if (es->shader->color_uniform != GL_NONE)
+ glUniform4fv(es->shader->color_uniform,1, es->color);
+
if (es->shader->alpha_uniform && es->alpha != ec->current_alpha) {
glUniform1f(es->shader->alpha_uniform, es->alpha / 255.0);
ec->current_alpha = es->alpha;