Skip to content

Instantly share code, notes, and snippets.

@michlimlim
Created November 18, 2021 16:51
Show Gist options
  • Select an option

  • Save michlimlim/8cf6aba9110974aa61b2b7982b0e4afb to your computer and use it in GitHub Desktop.

Select an option

Save michlimlim/8cf6aba9110974aa61b2b7982b0e4afb to your computer and use it in GitHub Desktop.
border antialiasing
background_distance = distance_from_rect(in.position.xy, in.rect_center, border_corner, corner_radius);
if (border_color.a != 0) {
color = mix(background_color, border_color, smoothstep(-0.5, 0.5, background_distance));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment