]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
Added basic shader files
authorAndy Belle-Isle <drumsetmonkey@gmail.com>
Sun, 1 Sep 2019 03:33:25 +0000 (23:33 -0400)
committerAndy Belle-Isle <drumsetmonkey@gmail.com>
Sun, 1 Sep 2019 03:33:25 +0000 (23:33 -0400)
Shaders/world.frag [new file with mode: 0644]
Shaders/world.vert [new file with mode: 0644]

diff --git a/Shaders/world.frag b/Shaders/world.frag
new file mode 100644 (file)
index 0000000..c23c923
--- /dev/null
@@ -0,0 +1,17 @@
+#version 430
+
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+
+//uniform sampler2D texture;
+
+//in vec3 texCoord;
+out vec4 FragColor;
+
+void main()
+{
+    FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
diff --git a/Shaders/world.vert b/Shaders/world.vert
new file mode 100644 (file)
index 0000000..795997a
--- /dev/null
@@ -0,0 +1,15 @@
+#version 430
+
+//layout(location = 0)in vec3 vertex;
+in vec3 vertex;
+
+uniform mat4 projection;
+uniform mat4 view;
+uniform mat4 model;
+
+//out vec3 texCoord;
+
+void main()
+{
+    gl_Position = projection * view * model * vec4(vertex, 1.0f);
+}