mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 13:49:49 +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;
|
||||
originalPixCoord *= fullSizeUntransformed;
|
||||
|
||||
vec4 pixColor = getColorForCoord(v_texcoord);
|
||||
pixColor[3] *= alpha;
|
||||
vec4 pixColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
bool done = false;
|
||||
|
||||
|
@ -112,6 +111,9 @@ void main() {
|
|||
if (pixColor[3] == 0.0)
|
||||
discard;
|
||||
|
||||
pixColor = getColorForCoord(v_texcoord) * pixColor[3];
|
||||
pixColor[3] *= alpha;
|
||||
|
||||
gl_FragColor = pixColor;
|
||||
}
|
||||
)#";
|
||||
|
|
Loading…
Reference in a new issue