Psilly.com
🍄
Relax, get psilly...
Login
Art
Listen
Watch
Read
Play
Talk
Chat
Jam
FAQ
About
Contact
Hyper Ball Lick
, 2021
JavaScript on WebGLRenderingContext
Tall tales of extreme bollock privation.
<sauce/>
Shaders
Vertex Shader
#version 300 es in vec2 a_position; in vec4 a_color; out vec4 v_color; void main(void) { gl_Position = vec4(a_position, 0.0, 1.0); v_color = a_color; }
Fragment Shader
#version 300 es #ifdef GL_FRAGMENT_PRECISION_HIGH precision highp float; #else precision mediump float; #endif uniform float u_time; uniform vec2 u_translate; uniform vec2 u_scale; out vec4 fragmentColor; void main() { float x = ( gl_FragCoord.x + u_translate.x ) * u_scale.x; float y = ( gl_FragCoord.y + u_translate.y ) * u_scale.y; // hyperbola (xy = 1) float z = x * y - 1.0; fragmentColor.r = mod(z - u_time / 96911.0 * 94111.0, 1.0); fragmentColor.g = z < 1.0 ? z : 1.0 / z; fragmentColor.b = mod(z - u_time / 96931.0 * 94111.0, 1.0); }