aboutsummaryrefslogtreecommitdiff
path: root/resources/shaders/main.glsl
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2020-07-06 07:17:09 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2020-07-06 07:17:09 +0200
commit29339928d7a05ca11786885643631206a978655e (patch)
treeb8c9f69f807a2002e2ac7649e48734b1c38bea8c /resources/shaders/main.glsl
parente29a9115d185d0b752868a36c8d56f6020bc4134 (diff)
Cleaning code
Diffstat (limited to 'resources/shaders/main.glsl')
-rw-r--r--resources/shaders/main.glsl26
1 files changed, 26 insertions, 0 deletions
diff --git a/resources/shaders/main.glsl b/resources/shaders/main.glsl
new file mode 100644
index 0000000..7d4067a
--- /dev/null
+++ b/resources/shaders/main.glsl
@@ -0,0 +1,26 @@
+// ----- Vertex Shader -----
+#version 330 core
+
+layout(location = 0) in vec3 position;
+uniform mat4 projection;
+uniform mat4 model;
+
+void main(){
+ gl_Position = projection * model * vec4(position,1);
+}
+
+// ----- Fragment Shader -----
+
+#version 330 core
+
+uniform vec2 resolution;
+uniform float time;
+
+out vec3 color;
+
+void main(){
+ vec2 coord=gl_FragCoord.xy/resolution;
+ coord-=0.5;
+ float d=length(coord);
+ color=vec3(d,1,1);
+}