Skip to content

Instantly share code, notes, and snippets.

@ZachSaucier
Last active December 6, 2021 20:12
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 ZachSaucier/f924f49fe8e8d8c9e5a1ae305ff6716a to your computer and use it in GitHub Desktop.
Save ZachSaucier/f924f49fe8e8d8c9e5a1ae305ff6716a to your computer and use it in GitHub Desktop.
float dist = 0.5*0.5 - (m.x * m.x + m.y * m.y);
float t = mix( dist / border, 1., max(0., sign(dist - border)) );
gl_FragColor = mix(color0, color1, t);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment