summaryrefslogtreecommitdiff
path: root/vcl/opengl/maskedTextureFragmentShader.glsl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-10-29 22:30:55 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-10 07:58:51 +0100
commit8bb1fb8cd100ae33eb7bdf1f483c88bf098999af (patch)
treee36b5218ed2305d573f72f2fed1247163baacaa2 /vcl/opengl/maskedTextureFragmentShader.glsl
parent80533fb4e03ef8c01125571a7dcc8da55aebf67d (diff)
extract shaders from source code
Conflicts: vcl/opengl/gdiimpl.cxx Change-Id: Ifbb55e58e0854cc491703b8ca8d8e582741a9bd9
Diffstat (limited to 'vcl/opengl/maskedTextureFragmentShader.glsl')
-rw-r--r--vcl/opengl/maskedTextureFragmentShader.glsl22
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/opengl/maskedTextureFragmentShader.glsl b/vcl/opengl/maskedTextureFragmentShader.glsl
new file mode 100644
index 000000000000..5353250aa3c5
--- /dev/null
+++ b/vcl/opengl/maskedTextureFragmentShader.glsl
@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+precision mediump float;
+varying vec2 tex_coord;
+uniform sampler2D sampler;
+uniform sampler2D mask;
+
+void main() {
+ vec4 texel0, texel1;
+ texel0 = texture2D(sampler, tex_coord);
+ texel1 = texture2D(mask, tex_coord);
+ gl_FragColor = texel0 * texel1.a;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */