aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/resources/assets/dungeonsguide/shaders/donut.frag
blob: cca6bc3900441ef4447594dc650b7ef04d22fb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 120


uniform float radius;
uniform float thickness;
uniform vec2 centerPos;
uniform float smoothness;



void main() {
    vec2 stuff = gl_FragCoord.xy - centerPos;
    float sdf = abs(length(stuff)-radius);
    float clampd = 1.0 - smoothstep(thickness, thickness+smoothness, sdf);

    gl_FragColor = gl_Color * vec4(1.0, 1.0, 1.0, clampd);
}