mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-03 23:15:23 +00:00
bar w new random
This commit is contained in:
parent
47221a6bb5
commit
4e24e72263
@ -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.);
|
||||||
|
Loading…
Reference in New Issue
Block a user