diff options
Diffstat (limited to 'resources/shaders/main.glsl')
| -rw-r--r-- | resources/shaders/main.glsl | 26 |
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); +} |
