Skip to content

Instantly share code, notes, and snippets.

@nasser
Created November 11, 2014 13:07
Show Gist options
  • Save nasser/2b7c18481848bc8c7ef9 to your computer and use it in GitHub Desktop.
Save nasser/2b7c18481848bc8c7ef9 to your computer and use it in GitHub Desktop.
void main(void)
{
float radius = 50.0;
float distanceToMouse = distance(gl_FragCoord.xy, iMouse.xy);
if(floor(distanceToMouse) == floor(radius)) {
gl_FragColor = vec4(1.);
} else {
gl_FragColor = vec4(0.);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment