compositor: specialised fragment shader for RGBX
Remove the weston_surface::blend attribute, which really meant that the
texture produced valid alpha values. This was used to override the opaque
region for RGBX surfaces, which produce undefined values for alpha.
Instead, compile a new shader especially for RGBX surfaces, that
hardcodes the sampled alpha as 1.0.
Before "compositor: optimize/simplify shaders" there was a 'vec4 opaque'
in the shaders, that would cause part of the texture to be forced to
alpha=1.0. Now that is gone, and we need this replacement.
To test: launch simple-shm, and use the super+alt+mousewheel combination
to make it transparent. It should not show a light cross over the window.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/src/compositor.h b/src/compositor.h
index 7e6220c..4cdb9e4 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -275,6 +275,7 @@
EGLConfig egl_config;
GLuint fbo;
struct weston_shader texture_shader_rgba;
+ struct weston_shader texture_shader_rgbx;
struct weston_shader texture_shader_egl_external;
struct weston_shader texture_shader_y_uv;
struct weston_shader texture_shader_y_u_v;
@@ -399,7 +400,6 @@
GLfloat color[4];
GLfloat opaque_rect[4];
GLfloat alpha;
- int blend;
struct weston_plane *plane;
/* Surface geometry state, mutable.