runnable fragment

Sidegrid

tangram-procedural-textures pattern glsl runnable fragment MIT
code snippet
precision mediump float;
varying vec2 v_texcoord;
vec2 tile(vec2 _st, float _zoom){
  _st *= _zoom;
  return fract(_st);
}

float X(vec2 _st, float _width){
  float pct0 = smoothstep(_st.x-_width,_st.x,_st.y);
  pct0 *= 1.-smoothstep(_st.x,_st.x+_width,_st.y);

  float pct1 = smoothstep(_st.x-_width,_st.x,1.0-_st.y);
  pct1 *= 1.-smoothstep(_st.x,_st.x+_width,1.0-_st.y);
runnable fragment

Star

tangram-procedural-textures pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
varying vec2 v_texcoord;
#define PI 3.14159265358979323846
#define TWO_PI 6.28318530717958647693
#define PHI 1.618033988749894848204586834

vec2 radialTile(vec2 _st, vec2 _vel, float _zoom){
  vec2 toExtreme = vec2(0.5)-_st;
  vec2 polar = vec2( (PI+atan(toExtreme.y,toExtreme.x))/TWO_PI,   // Angle
                      log(length(toExtreme))*PHI*0.1);            // Radius
  polar *= _zoom;

  polar.y += _vel.y;
runnable fragment

Wave

tangram-procedural-textures pattern glsl runnable fragment MIT
code snippet
precision mediump float;
varying vec2 v_texcoord;
#define PI 3.14159265358979323846

float plotX(vec2 _st, float _pct,float _antia){
  return  smoothstep( _pct-_antia, _pct, _st.x) - 
          smoothstep( _pct, _pct+_antia, _st.x);
}

float plotY(vec2 _st, float _pct,float _antia){
  return  smoothstep( _pct-_antia, _pct, _st.y) - 
          smoothstep( _pct, _pct+_antia, _st.y);
}