summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-11-01 18:01:34 +0000
committerPhil Jones <philj56@gmail.com>2021-11-01 18:01:34 +0000
commit3ddbca74567ecab28b2b1624e6e9b026f9705f3c (patch)
treee5419f2e40b2bdc9dcc6f5ef378ec92967365015 /shaders
parent94fa998b7e3524ce101a977ed3516fac13461287 (diff)
Switch from OpenGL ES 3 to 2.
Diffstat (limited to 'shaders')
-rw-r--r--shaders/frag.frag10
-rw-r--r--shaders/vert.vert8
2 files changed, 8 insertions, 10 deletions
diff --git a/shaders/frag.frag b/shaders/frag.frag
index c6bdbde..3528c6c 100644
--- a/shaders/frag.frag
+++ b/shaders/frag.frag
@@ -1,4 +1,4 @@
-#version 300 es
+#version 100
/*
* Copyright (C) 2021 Philip Jones
@@ -11,15 +11,13 @@
* I don't think you can really copyright this shader though :)
*/
-precision highp float;
+precision mediump float;
-in vec2 Texcoord;
-
-out vec4 FragColor;
+varying vec2 Texcoord;
uniform sampler2D tex;
void main()
{
- FragColor = texture(tex, Texcoord);
+ gl_FragColor = texture2D(tex, Texcoord);
}
diff --git a/shaders/vert.vert b/shaders/vert.vert
index 9d62b85..9d3a0eb 100644
--- a/shaders/vert.vert
+++ b/shaders/vert.vert
@@ -1,4 +1,4 @@
-#version 300 es
+#version 100
/*
* Copyright (C) 2017-2020 Philip Jones
@@ -10,10 +10,10 @@
*
*/
-in vec2 position;
-in vec2 texcoord;
+attribute vec2 position;
+attribute vec2 texcoord;
-out vec2 Texcoord;
+varying vec2 Texcoord;
void main()
{