Skip to content

Instantly share code, notes, and snippets.

@ewpratten
Created October 20, 2021 19:03
Show Gist options
  • Save ewpratten/3c844d3b4c22f5b5f38fb759bc8be6b5 to your computer and use it in GitHub Desktop.
Save ewpratten/3c844d3b4c22f5b5f38fb759bc8be6b5 to your computer and use it in GitHub Desktop.
const float maxOpacity = 0.25;
const float zoom = 0.75;
const int spacing = 1;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec3 col = vec3(1) - (vec3(max(cos(fragCoord.x * zoom) + cos(fragCoord.y * zoom) - 1.0, 0.0)) * maxOpacity);
fragColor = vec4(col,1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment