summaryrefslogtreecommitdiff
path: root/themes/src/_shaders
diff options
context:
space:
mode:
Diffstat (limited to 'themes/src/_shaders')
-rw-r--r--themes/src/_shaders/renderer2d.frag5
-rw-r--r--themes/src/_shaders/renderer2d.vert13
2 files changed, 18 insertions, 0 deletions
diff --git a/themes/src/_shaders/renderer2d.frag b/themes/src/_shaders/renderer2d.frag
index e69de29..8463e06 100644
--- a/themes/src/_shaders/renderer2d.frag
+++ b/themes/src/_shaders/renderer2d.frag
@@ -0,0 +1,5 @@
+varying lowp vec4 VertexColor;
+
+void main() {
+ gl_FragColor = VertexColor;
+}
diff --git a/themes/src/_shaders/renderer2d.vert b/themes/src/_shaders/renderer2d.vert
index e69de29..76150f0 100644
--- a/themes/src/_shaders/renderer2d.vert
+++ b/themes/src/_shaders/renderer2d.vert
@@ -0,0 +1,13 @@
+
+attribute vec2 position;
+attribute vec4 color;
+attribute mat4 vMatrix;
+uniform mat4 projection;
+uniform mat4 model;
+varying lowp vec4 VertexColor;
+
+void main() {
+ vec4 fragmentPosition = projection * model * vMatrix * vec4(position.x, position.y, 0, 1);
+ gl_Position = fragmentPosition;
+ VertexColor = color;
+}