diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-24 15:00:26 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-08-24 19:08:10 +0900 |
commit | bdce4e29191aa5bd029efa242e094aba45c44869 (patch) | |
tree | 5088ad08e3d44dbda6fc901ae0afe3eaebff56c3 /vcl/opengl/blendedTextureVertexShader.glsl | |
parent | b26ba85d04e81f48622dfdbb71d9d80b54dacc40 (diff) |
opengl: push mask coords to the shaders along the image coords
If using the same texture to store the image and mask data (for
example when using texture atlas) the mask and image (RGB) coords
aren't the same anymore. With this commit we always define the mask
coords separately.
Change-Id: Ie33f87a6e9ab398972c6a3d5938e5f1364c82d36
Diffstat (limited to 'vcl/opengl/blendedTextureVertexShader.glsl')
-rw-r--r-- | vcl/opengl/blendedTextureVertexShader.glsl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/opengl/blendedTextureVertexShader.glsl b/vcl/opengl/blendedTextureVertexShader.glsl index 3a9b827d1e19..64bae785aa78 100644 --- a/vcl/opengl/blendedTextureVertexShader.glsl +++ b/vcl/opengl/blendedTextureVertexShader.glsl @@ -10,14 +10,17 @@ attribute vec4 position; attribute vec2 tex_coord_in; attribute vec2 alpha_coord_in; +attribute vec2 mask_coord_in; varying vec2 tex_coord; varying vec2 alpha_coord; +varying vec2 mask_coord; uniform mat4 mvp; void main() { gl_Position = mvp * position; tex_coord = tex_coord_in; alpha_coord = alpha_coord_in; + mask_coord = mask_coord_in; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |