rms/resources/shaders/main.glsl
2020-07-06 07:17:09 +02:00

26 lines
431 B
GLSL

// ----- 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);
}