removed extraneous shader changes

This commit is contained in:
Will McKinnon 2023-01-17 02:07:17 -05:00
parent 42f9949981
commit 832a2f00b9
6 changed files with 13 additions and 13 deletions

View file

@ -18,10 +18,10 @@ float roundedBoxSDF(vec2 center, vec2 size, float radius) {
void main() {
vec2 center = gl_FragCoord.xy - position - half_size;
float dist = roundedBoxSDF(center, half_size - half_thickness, radius + half_thickness);
float smoothedAlphaOuter = 1.0 - smoothstep(-1.0, 1.0, dist - half_thickness);
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
float smoothedAlphaInner = 1.0 - smoothstep(-1.0, 0.5, dist + half_thickness);
float smoothedAlphaInner = 1.0 - smoothstep(-1.0, 0.5, distance + half_thickness);
gl_FragColor = mix(vec4(0), v_color, smoothedAlphaOuter - smoothedAlphaInner);
if (is_top_left && (center.y > 0.0 || center.x > 0.0)) {

View file

@ -8,7 +8,7 @@ uniform float radius;
void main() {
vec2 q = abs(gl_FragCoord.xy - position - size) - size + radius;
float dist = min(max(q.x,q.y), 0.0) + length(max(q, 0.0)) - radius;
float smoothedAlpha = 1.0 - smoothstep(-1.0, 0.5, dist);
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);
}

View file

@ -8,7 +8,7 @@ uniform float radius;
void main() {
vec2 q = abs(gl_FragCoord.xy - position - vec2(0, size.y)) - size + radius;
float dist = min(max(q.x,q.y), 0.0) + length(max(q, 0.0)) - radius;
float smoothedAlpha = 1.0 - smoothstep(-1.0, 0.5, dist);
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);
}

View file

@ -29,8 +29,8 @@ void main() {
if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float dist = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, dist);
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}

View file

@ -27,8 +27,8 @@ void main() {
if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float dist = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, dist);
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}

View file

@ -26,8 +26,8 @@ void main() {
if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float dist = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, dist);
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}