Commit Graph

26 Commits

Author SHA1 Message Date
Kovid Goyal
d52f2e7981 Rewrite rendering pipeline
This was needed to fix various corner cases when doing blending of colors
in linear space. The new architecture has the same performance as the
old in the common case of opaque rendering with no UI layers or images.

In the case of only positive z-index images there is a performance
decrease as the OS Window is now rendered to a offscreen texture and
then blitted to screen. However, in the future when we move to Vulkan or
I can figure out how to get Wayland to accept buffers with colors in
linear space, this performance penalty can be removed. The performance
penalty was not significant on my system but this is highly GPU
dependent. Modern GPUs are supposedly optimised for rendering to
offscreen buffers, so we will see. The awrit project might be a good
test case.

Now either we have 1-shot rendering for the case of opaque with only ext
or all the various pieces are rendered in successive draw calls into an
offscreen buffer that is blitted to the output buffer after all drawing
is done.

Fixes #8869
2025-08-11 00:47:02 +05:30
Kovid Goyal
216b6e2e8c Bell color should also not be rendered translucent 2024-09-26 00:29:20 +05:30
Kovid Goyal
cb13233606 Proper fix for always drawing borders opaque 2024-09-26 00:08:36 +05:30
Kovid Goyal
b854589761 Revert "Fix a regression when tinting of background images was introduced that caused window borders to have background_opacity applied to them"
This reverts commit 33e4a0f9cc.
Fixes #7895
2024-09-25 23:28:38 +05:30
Kovid Goyal
33e4a0f9cc Fix a regression when tinting of background images was introduced that caused window borders to have background_opacity applied to them
Fixes #7850
2024-09-12 21:52:55 +05:30
Kovid Goyal
902b9e9693 Go back to using uniforms for the gamma LUT
Apparently older macOS M1 GPU drivers' performance falls off a cliff
when using const float arrays instead. Fixes #6479
2023-07-18 19:28:15 +05:30
Kovid Goyal
bf6c848be4 Use the new shader include system to avoid having to upload 256 uniform floats to two different programs on the GPU 2023-06-22 20:31:55 +05:30
Kovid Goyal
e1ce6d08e0 Only apply linear2srgb to actual text pixels
Better fix for #6209 as it does not make background_opacity non-linear.
Instead the linear2srgb() function is applied only to pixels that
actually have text content.
2023-06-20 13:45:34 +05:30
Kovid Goyal
288bb034b5 Remove duplicate definitions of linear2srgb functions in shaders 2023-06-13 14:54:20 +05:30
Kovid Goyal
f6ccd2ad2c Dont apply linear2srgb in borders with bg image as the cell shader doesnt apply it then either 2023-04-30 10:19:35 +05:30
Kovid Goyal
07dbfaa297 Fix #6224 2023-04-30 08:28:02 +05:30
Martin Wernstål
b10c18b8fe feat: Use sRGB LUT for borders 2023-02-02 09:53:39 +01:00
Kovid Goyal
8e0e70e2d6 Simplify passing colors to the borders shader 2022-12-04 16:08:32 +05:30
Kovid Goyal
cf22729dfa Fix background_tint not applying to window margins and padding
Fixes #3933
2022-10-03 21:39:57 +05:30
Kovid Goyal
a867b4444d Clamp border rects to pixels
This uses the same co-ord calculation for border rects as for text
cells. DRYer and avoids borders and blank rects being drawn at haf pixel
offsets.
2021-12-31 06:20:57 +05:30
Kovid Goyal
4385acd3c6 A new option to set the tab bar margin color independently 2021-10-25 12:21:46 +05:30
Kovid Goyal
66bf39db93 DRYer 2021-09-23 20:20:47 +05:30
Kovid Goyal
be439cb887 When a tab_bar_background is specified it should extend to the edges of the OS window
Fixes #4054
2021-09-23 20:12:30 +05:30
Kovid Goyal
f2afba2ef4 Change the window border color if a bell occurs in an unfocused window. Can be disabled by setting the bell_border_color to be the same as the inactive_border_color. 2018-05-02 22:02:45 +05:30
Kovid Goyal
f25ecedcab Always set the padding color to current window background 2018-02-20 09:43:59 +05:30
Kovid Goyal
2913c1aedc Change the color of the padding and margins to match the current background color of the window, when only a single window is visible.
Fixes #323
2018-02-20 09:43:49 +05:30
Kovid Goyal
b8faba2a16 More trailing space removal 2017-12-20 08:50:09 +05:30
Kovid Goyal
1e37041b50 Fix rendering of horizontal borders 2017-09-15 10:45:21 +05:30
Kovid Goyal
2a24199c90 Migrate the borders program 2017-09-15 10:45:21 +05:30
Kovid Goyal
5905216f96 Use instanced rendering for the borders 2017-09-15 10:45:21 +05:30
Kovid Goyal
acdeaaeda5 Move the border shaders into their own files 2017-09-15 10:45:08 +05:30