style: shader style fixes
This commit is contained in:
parent
1a9f17054d
commit
6ef904a960
|
@ -20,7 +20,7 @@ void main() {
|
|||
vec2 center = gl_FragCoord.xy - position - half_size;
|
||||
float distance = roundedBoxSDF(center, half_size - half_thickness, radius + half_thickness);
|
||||
float smoothedAlphaOuter = 1.0 - smoothstep(-1.0, 1.0, distance - half_thickness);
|
||||
// Create an inner circle that isn't as anti-aliased as the outer ring
|
||||
// Create an inner circle that isn't as anti-aliased as the outer ring
|
||||
float smoothedAlphaInner = 1.0 - smoothstep(-1.0, 0.5, distance + half_thickness);
|
||||
gl_FragColor = mix(vec4(0), v_color, smoothedAlphaOuter - smoothedAlphaInner);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ uniform float radius;
|
|||
|
||||
void main() {
|
||||
vec2 q = abs(gl_FragCoord.xy - position - size) - size + radius;
|
||||
float distance = min(max(q.x,q.y),0.0) + length(max(q,0.0)) - radius;
|
||||
float distance = min(max(q.x,q.y),0.0) + length(max(q,0.0)) - radius;
|
||||
float smoothedAlpha = 1.0 - smoothstep(-1.0, 0.5, distance);
|
||||
gl_FragColor = mix(vec4(0), v_color, smoothedAlpha);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ uniform float radius;
|
|||
|
||||
void main() {
|
||||
vec2 q = abs(gl_FragCoord.xy - position - vec2(0, size.y)) - size + radius;
|
||||
float distance = min(max(q.x,q.y),0.0) + length(max(q,0.0)) - radius;
|
||||
float distance = min(max(q.x,q.y),0.0) + length(max(q,0.0)) - radius;
|
||||
float smoothedAlpha = 1.0 - smoothstep(-1.0, 0.5, distance);
|
||||
gl_FragColor = mix(vec4(0), v_color, smoothedAlpha);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue