Skip to content

Instantly share code, notes, and snippets.

@torcado194
Created February 1, 2026 00:17
Show Gist options
  • Select an option

  • Save torcado194/821dfdb5486220912a8280914ae6a1f6 to your computer and use it in GitHub Desktop.

Select an option

Save torcado194/821dfdb5486220912a8280914ae6a1f6 to your computer and use it in GitHub Desktop.
radial.gdshader
shader_type canvas_item;
uniform float innerRadius = 0.0;
uniform float repeat = 1.0;
void fragment() {
vec2 px = UV-0.5;
float r = mod(sqrt(px.x*px.x + px.y*px.y), 1.0)*2.0;
r = (r-innerRadius)/(1.0-innerRadius);
float t = mod(atan(px.y, px.x)/(TAU*1.0/repeat), 1.0);
COLOR = texture(TEXTURE, vec2(t,r));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment