scop/src/shader.fs

18 lines
297 B
GLSL

#version 330
uniform float time;
out vec4 FragColor;
flat in int vID;
float rand(float n)
{
return fract(sin(n) * 43758.5453123);
}
void main()
{
vec3 color = vec3(rand(float(vID + int(time))), rand(float(vID + int(time))), rand(float(vID + int(time))));
FragColor = vec4(color, 1.0);
}