bar w new random

This commit is contained in:
Patricio Gonzalez Vivo 2015-10-07 16:14:08 -04:00
parent 47221a6bb5
commit 4e24e72263

View File

@ -9,7 +9,8 @@ uniform vec2 u_resolution;
uniform float u_time; uniform float u_time;
float random (in float x) { return fract(sin(x)*43758.5453); } 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 binChar (vec2 ipos, float n) {
float remain = mod(n,33554432.); float remain = mod(n,33554432.);