Skip to content

Instantly share code, notes, and snippets.

@nathanielstenzel
Last active July 16, 2023 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanielstenzel/fb354464657d1a360e8f2ded2bb9c02d to your computer and use it in GitHub Desktop.
Save nathanielstenzel/fb354464657d1a360e8f2ded2bb9c02d to your computer and use it in GitHub Desktop.
A shader based screenart that can be seen at https://glslsandbox.com/e#104619.0
#extension GL_OES_standard_derivatives : enable
precision highp float;
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
void main( void ) {
vec2 position = gl_FragCoord.xy;
float r,g,b,reducer,t = 0.0;
vec2 offset = position - resolution/2.0;
r = offset.x * (1.0 + offset.y);
g = offset.y * (1.0 + offset.x);
b = (r+g)/2.0;
reducer = max(resolution.x,resolution.y)/15.0;
t=time;
gl_FragColor = vec4( sin(t+r/reducer),cos(t+g/reducer), cos(t+b/reducer), 1.0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment