runnable fragment
code snippet
precision mediump float;
varying vec2 v_texCoord;
uniform sampler2D u_texture;
uniform vec2 u_resolution;
uniform float u_size; // dot size (2-30)
uniform float u_angle; // degrees (0-90)
uniform int u_type; // 0=dots, 1=lines
float lum(vec3 c) {
return dot(c, vec3(0.299, 0.587, 0.114));
}
void main() {
vec2 uv = v_texCoord * u_resolution;