summaryrefslogtreecommitdiff
path: root/chart2/opengl
diff options
context:
space:
mode:
authorweigao <weigao@multicorewareinc.com>2014-05-07 15:10:42 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-08 05:20:57 +0200
commita63ad6f2749f054270671285d1f49057c3013d56 (patch)
tree72fe440056a7d4cee21a37ba7c990d1de255f530 /chart2/opengl
parent8018772ac7c75a042a6749d1c675401cd4c77d62 (diff)
add reverse image shader
Change-Id: Ibd3aff8aeb71626dada762b53cde8f50f7fbf812
Diffstat (limited to 'chart2/opengl')
-rw-r--r--chart2/opengl/renderTextureFragmentShader.glsl18
-rw-r--r--chart2/opengl/renderTextureVertexShader.glsl19
2 files changed, 37 insertions, 0 deletions
diff --git a/chart2/opengl/renderTextureFragmentShader.glsl b/chart2/opengl/renderTextureFragmentShader.glsl
new file mode 100644
index 000000000000..a6c71f4e4d96
--- /dev/null
+++ b/chart2/opengl/renderTextureFragmentShader.glsl
@@ -0,0 +1,18 @@
+/* -*- 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/.
+ */
+
+uniform sampler2D RenderTex;
+varying vec2 vTexCoord;
+
+void main()
+{
+ gl_FragColor = vec4(texture2D(RenderTex, vTexCoord).rgb, 1.0);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/opengl/renderTextureVertexShader.glsl b/chart2/opengl/renderTextureVertexShader.glsl
new file mode 100644
index 000000000000..dd11b155b0fa
--- /dev/null
+++ b/chart2/opengl/renderTextureVertexShader.glsl
@@ -0,0 +1,19 @@
+/* -*- 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/.
+ */
+
+attribute vec4 vPosition;
+attribute vec2 texCoord;
+varying vec2 vTexCoord;
+void main()
+{
+ gl_Position = vPosition;
+ vTexCoord = texCoord;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */