mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
optimize border shader
Do not calculate gradient for discarded fragments
This commit is contained in:
parent
b2cb3b8bf2
commit
7699d657d9
1 changed files with 4 additions and 2 deletions
|
@ -55,8 +55,7 @@ void main() {
|
||||||
highp vec2 originalPixCoord = v_texcoord;
|
highp vec2 originalPixCoord = v_texcoord;
|
||||||
originalPixCoord *= fullSizeUntransformed;
|
originalPixCoord *= fullSizeUntransformed;
|
||||||
|
|
||||||
vec4 pixColor = getColorForCoord(v_texcoord);
|
vec4 pixColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||||||
pixColor[3] *= alpha;
|
|
||||||
|
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
||||||
|
@ -112,6 +111,9 @@ void main() {
|
||||||
if (pixColor[3] == 0.0)
|
if (pixColor[3] == 0.0)
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
|
pixColor = getColorForCoord(v_texcoord) * pixColor[3];
|
||||||
|
pixColor[3] *= alpha;
|
||||||
|
|
||||||
gl_FragColor = pixColor;
|
gl_FragColor = pixColor;
|
||||||
}
|
}
|
||||||
)#";
|
)#";
|
||||||
|
|
Loading…
Reference in a new issue