mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-22 19:28:29 +00:00
Don't blur behind opaque pixels
This commit is contained in:
@@ -47,8 +47,17 @@ uniform vec2 bottomRight;
|
||||
uniform vec2 fullSize;
|
||||
uniform float radius;
|
||||
|
||||
uniform int discardOpaque;
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 pixColor = texture2D(tex, v_texcoord);
|
||||
|
||||
if (discardOpaque == 1 && pixColor[3] == 1.0) {
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
||||
vec2 pixCoord = fullSize * v_texcoord;
|
||||
|
||||
if (pixCoord[0] < topLeft[0]) {
|
||||
@@ -84,7 +93,7 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D(tex, v_texcoord) * alpha;
|
||||
gl_FragColor = pixColor * alpha;
|
||||
})#";
|
||||
|
||||
inline const std::string TEXFRAGSRCRGBX = R"#(
|
||||
@@ -98,7 +107,14 @@ uniform vec2 bottomRight;
|
||||
uniform vec2 fullSize;
|
||||
uniform float radius;
|
||||
|
||||
uniform int discardOpaque;
|
||||
|
||||
void main() {
|
||||
|
||||
if (discardOpaque == 1) {
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
||||
vec2 pixCoord = fullSize * v_texcoord;
|
||||
|
||||
@@ -252,8 +268,17 @@ uniform vec2 bottomRight;
|
||||
uniform vec2 fullSize;
|
||||
uniform float radius;
|
||||
|
||||
uniform int discardOpaque;
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 pixColor = texture2D(texture0, v_texcoord);
|
||||
|
||||
if (discardOpaque == 1 && pixColor[3] == 1.0) {
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
||||
vec2 pixCoord = fullSize * v_texcoord;
|
||||
|
||||
if (pixCoord[0] < topLeft[0]) {
|
||||
@@ -289,5 +314,5 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D(texture0, v_texcoord) * alpha;
|
||||
gl_FragColor = pixColor * alpha;
|
||||
})#";
|
||||
|
Reference in New Issue
Block a user