『The Book of Shaders』でカーソルに追従する円作ったやつ
#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
void main() {
vec2 mouse = (u_mouse.xy / u_resolution - .5) * 2.0;
vec2 pos = (gl_FragCoord.xy / u_resolution - .5) * 2.0;
gl_FragColor = vec4(
1.0,
1.0,
1.0,
sqrt(pow(pos.x - mouse.x, 2.0) + pow(pos.y - mouse.y, 2.0))
);
}