runnable fragment
code snippet
precision mediump float;
varying vec2 v_texCoord;
uniform sampler2D u_texture;
uniform vec2 u_resolution;
uniform float u_intensity; // 0-3
uniform int u_mode; // 0=sobel line art, 1=overlay, 2=edges only
float lum(vec3 c) {
return dot(c, vec3(0.299, 0.587, 0.114));
}
void main() {
vec2 ps = 1.0 / u_resolution;