summaryrefslogtreecommitdiffstats
path: root/src/view/renderer/shaders
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-11-01 00:59:13 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-11-01 00:59:13 +0100
commit9f2e4e6996fb96d23e1ca29667130a2111a59de5 (patch)
treefa7c3c22d469f062252735269dbc09031fc47dd8 /src/view/renderer/shaders
parent22b06efe2c2646a01535b5bbf5f3cc57de81ad0d (diff)
downloadrpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.tar
rpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.zip
Do not use default exports
Diffstat (limited to 'src/view/renderer/shaders')
-rw-r--r--src/view/renderer/shaders/default.fs10
-rw-r--r--src/view/renderer/shaders/default.vs13
2 files changed, 23 insertions, 0 deletions
diff --git a/src/view/renderer/shaders/default.fs b/src/view/renderer/shaders/default.fs
new file mode 100644
index 0000000..2c8ad15
--- /dev/null
+++ b/src/view/renderer/shaders/default.fs
@@ -0,0 +1,10 @@
+precision highp float;
+
+varying vec2 vTextureCoord;
+
+uniform sampler2D uSampler;
+
+
+void main(void) {
+ gl_FragColor = texture2D(uSampler, vTextureCoord);
+}
diff --git a/src/view/renderer/shaders/default.vs b/src/view/renderer/shaders/default.vs
new file mode 100644
index 0000000..4715a17
--- /dev/null
+++ b/src/view/renderer/shaders/default.vs
@@ -0,0 +1,13 @@
+attribute vec2 aVertexPos;
+attribute vec2 aTextureCoord;
+
+uniform mat4 uViewport;
+uniform vec2 uTranslate;
+
+varying highp vec2 vTextureCoord;
+
+
+void main(void) {
+ gl_Position = uViewport * vec4(aVertexPos + uTranslate, 0.0, 1.0);
+ vTextureCoord = aTextureCoord;
+}