compositor: specialised fragment shader for RGBX
authorPekka Paalanen <ppaalanen@gmail.com>
Thu, 30 Aug 2012 21:47:19 +0000 (16:47 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 31 Aug 2012 21:51:54 +0000 (17:51 -0400)
commit6b5585be0d885f86596f8d0793449a2d6e5524de
tree1332b92320f6f14b250b941db9982b87653e03a6
parent0e5a2d02191587146ad3d19d5eedda3f3d0eace9
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>
src/compositor.c
src/compositor.h