aboutsummaryrefslogtreecommitdiff
path: root/system/shaders
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-01-25 21:09:25 -0800
committerLukas Rusak <lorusak@gmail.com>2018-01-28 08:00:54 -0800
commit917fbf9ac91282f2fdedbd8069658dffdcfdea8c (patch)
tree13117ce0e87449fe0558607f04671fb2ca73a2bd /system/shaders
parenteed84c76f2c36ee75b4f12bcbe5ee9b2d22d9782 (diff)
shaders: add default GLES 2.0 videofilter shaders
Diffstat (limited to 'system/shaders')
-rw-r--r--system/shaders/GLES/2.0/gles_videofilter.frag11
-rw-r--r--system/shaders/GLES/2.0/gles_videofilter.vert14
2 files changed, 25 insertions, 0 deletions
diff --git a/system/shaders/GLES/2.0/gles_videofilter.frag b/system/shaders/GLES/2.0/gles_videofilter.frag
new file mode 100644
index 0000000000..d4c15eeee5
--- /dev/null
+++ b/system/shaders/GLES/2.0/gles_videofilter.frag
@@ -0,0 +1,11 @@
+#version 100
+
+precision mediump float;
+
+uniform sampler2D img;
+varying vec2 cord;
+
+void main()
+{
+ gl_FragColor = texture2D(img, cord);
+} \ No newline at end of file
diff --git a/system/shaders/GLES/2.0/gles_videofilter.vert b/system/shaders/GLES/2.0/gles_videofilter.vert
new file mode 100644
index 0000000000..2d5a0f9b44
--- /dev/null
+++ b/system/shaders/GLES/2.0/gles_videofilter.vert
@@ -0,0 +1,14 @@
+#version 100
+
+attribute vec4 m_attrpos;
+attribute vec2 m_attrcord;
+varying vec2 cord;
+uniform mat4 m_proj;
+uniform mat4 m_model;
+
+void main ()
+{
+ mat4 mvp = m_proj * m_model;
+ gl_Position = mvp * m_attrpos;
+ cord = m_attrcord.xy;
+}