diff --git a/10/tmp/barcode.frag b/10/tmp/barcode.frag index ba8c44b..ea70b86 100644 --- a/10/tmp/barcode.frag +++ b/10/tmp/barcode.frag @@ -9,7 +9,8 @@ uniform vec2 u_resolution; uniform float u_time; float random (in float x) { return fract(sin(x)*43758.5453); } -float random (in vec2 st) { return fract(sin(dot(st.xy ,vec2(12.9898,78.233))) * 43758.5453); } +// float random (in vec2 st) { return fract(sin(dot(st.xy ,vec2(12.9898,78.233))) * 43758.5453); } +float random (vec2 p) { return fract(1e4 * sin(17.0 * p.x + p.y * 0.1) * (0.1 + abs(sin(p.y * 13.0 + p.x)))); } float binChar (vec2 ipos, float n) { float remain = mod(n,33554432.);