diff --git a/include/sway/desktop/shaders.h b/include/sway/desktop/shaders.h index a30d45e0..4ff9ca42 100644 --- a/include/sway/desktop/shaders.h +++ b/include/sway/desktop/shaders.h @@ -123,24 +123,20 @@ const GLchar corner_fragment_src[] = "}\n" "\n" "void main() {\n" -" gl_FragColor = v_color;\n" " vec2 center = gl_FragCoord.xy - position - half_size;\n" " float distance = roundedBoxSDF(center, half_size - half_thickness, radius + half_thickness);\n" " float smoothedAlphaOuter = 1.0 - smoothstep(-1.0, 1.0, distance - half_thickness);\n" // 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);\n" -" gl_FragColor = mix(vec4(0), gl_FragColor, smoothedAlphaOuter - smoothedAlphaInner);\n" +" gl_FragColor = mix(vec4(0), v_color, smoothedAlphaOuter - smoothedAlphaInner);\n" "\n" " if (is_top_left && (center.y > 0.0 || center.x > 0.0)) {\n" " discard;\n" -" }\n" -" else if (is_top_right && (center.y > 0.0 || center.x < 0.0)) {\n" +" } else if (is_top_right && (center.y > 0.0 || center.x < 0.0)) {\n" " discard;\n" -" }\n" -" else if (is_bottom_left && (center.y < 0.0 || center.x > 0.0)) {\n" +" } else if (is_bottom_left && (center.y < 0.0 || center.x > 0.0)) {\n" " discard;\n" -" }\n" -" else if (is_bottom_right && (center.y < 0.0 || center.x < 0.0)) {\n" +" } else if (is_bottom_right && (center.y < 0.0 || center.x < 0.0)) {\n" " discard;\n" " }\n" "}\n";