# Fix border rendering \(\#3884\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f14149503d6d9ff9d4bbda80df3148fb2a907df6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f14149503d6d9ff9d4bbda80df3148fb2a907df6

Requested commit: f14149503d6d9ff9d4bbda80df3148fb2a907df6

Commit: f14149503d6d9ff9d4bbda80df3148fb2a907df6

Tree: 6b35fcf0e1caea8b67264984117d1605c2275820

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Fix border rendering (#3884)

After implementing it a while ago, our previous interpolation scheme
didn't really make sense to me and was causing borders to be rendered
incorrectly. We don't really draw backgrounds and borders as part of the
same draw call anymore, but it seemed reasonable to have a correct
implementation in the shader anyway.

This commit uses Porter-Duff compositing (i.e., `over`) to produce a
color that is the result of superimposing the border on top of the
background. Then, we linearly interpolate towards the background color
as we slide out of the border and into the background.

Release Notes:

- Fixed incorrect rendering of borders.
```

## Parents

- [e5156d1f851d1c36d436276f0f43aab147152e3b](https://git.cafe/gitcafe/zed/commit/e5156d1f851d1c36d436276f0f43aab147152e3b?format=markdown)

- [3ab20626147a0bbe4739e6bdb8faf8ee78137b22](https://git.cafe/gitcafe/zed/commit/3ab20626147a0bbe4739e6bdb8faf8ee78137b22?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f14149503d6d9ff9d4bbda80df3148fb2a907df6?format=markdown)
