From 29339928d7a05ca11786885643631206a978655e Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 6 Jul 2020 07:17:09 +0200 Subject: Cleaning code --- resources/shaders/main.glsl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 resources/shaders/main.glsl (limited to 'resources/shaders/main.glsl') 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); +} -- cgit v1.2.3