summaryrefslogtreecommitdiff
path: root/frontend/_rigidbody/shaders
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-02-06 18:39:48 -0500
committerMatthew Kosarek <mattkae@protonmail.com>2021-02-06 18:39:48 -0500
commit376e1a7f9207fffb1ec3027ac1e7f32db5de4922 (patch)
tree8bc6c381a10d8b62ff33cdcff6daa1d17cee0f9a /frontend/_rigidbody/shaders
Initial commit
Diffstat (limited to 'frontend/_rigidbody/shaders')
-rw-r--r--frontend/_rigidbody/shaders/orthographic.frag5
-rw-r--r--frontend/_rigidbody/shaders/orthographic.vert13
2 files changed, 18 insertions, 0 deletions
diff --git a/frontend/_rigidbody/shaders/orthographic.frag b/frontend/_rigidbody/shaders/orthographic.frag
new file mode 100644
index 0000000..84b6b2e
--- /dev/null
+++ b/frontend/_rigidbody/shaders/orthographic.frag
@@ -0,0 +1,5 @@
+varying lowp vec4 VertexColor;
+
+void main() {
+ gl_FragColor = VertexColor;
+} \ No newline at end of file
diff --git a/frontend/_rigidbody/shaders/orthographic.vert b/frontend/_rigidbody/shaders/orthographic.vert
new file mode 100644
index 0000000..0356f9c
--- /dev/null
+++ b/frontend/_rigidbody/shaders/orthographic.vert
@@ -0,0 +1,13 @@
+attribute vec2 position;
+attribute vec4 color;
+
+uniform mat4 projection;
+uniform mat4 model;
+
+varying lowp vec4 VertexColor;
+
+void main() {
+ vec4 fragmentPosition = projection * model * vec4(position, 1, 1);
+ gl_Position = fragmentPosition;
+ VertexColor = color;
+} \ No newline at end of file