Mitchell Hashimoto
3a7dc355a0
renderer/metal: invert text under cursor again
2024-04-27 22:13:17 -07:00
Mitchell Hashimoto
ced8776120
renderer/metal: grid pos for bg/text should be ushort2
...
This saves 50% memory per vertex.
2024-04-25 19:16:40 -07:00
Mitchell Hashimoto
d12e3db599
renderer/metal: dedicated cell fg shader
2024-04-22 10:58:23 -07:00
Mitchell Hashimoto
e8b623e829
renderer/metal: dedicated cell bg shader
2024-04-22 10:43:29 -07:00
Mitchell Hashimoto
4398896905
renderer/opengl: strikethrough as sprite
2024-04-22 10:30:27 -07:00
Mitchell Hashimoto
ad08842e86
renderer/metal: remove strikethrough support from GPU
2024-04-22 10:26:51 -07:00
Mitchell Hashimoto
43c105c363
renderer: constrain emoji to cell width
...
Fixes #1402
2024-01-28 09:07:49 -08:00
Mitchell Hashimoto
5622ab370f
renderer/metal,opengl: premult alpha for fragment shaders for images
...
Fixes #1346
2024-01-21 14:07:16 -08:00
Mitchell Hashimoto
62a2fdcf88
renderer/opengl: set texture size for constrained glyphs
...
This wasn't setting the texture size so the glyphs would show up blank
(zero texture size).
2024-01-15 15:04:05 -08:00
Mitchell Hashimoto
62e5234da4
renderer: for constrained cells, offset was being doubled
...
This helps better preserve the centerline for constrained glyphs
2024-01-07 15:02:56 -08:00
Mitchell Hashimoto
231a2b6369
renderer/opengl: implement fg_constrained
2023-12-16 20:11:37 -08:00
Mitchell Hashimoto
0b658c8217
renderer/metal: constrain PUA glyphs if they aren't next to space
2023-12-16 20:07:25 -08:00
Mitchell Hashimoto
ec8f3d036e
renderer/opengl: implement min contrast
2023-12-01 21:55:51 -08:00
Mitchell Hashimoto
e3eba92c0e
renderer/metal: only apply min contrast if set and only on non-color fg
2023-12-01 21:26:33 -08:00
Mitchell Hashimoto
7af4009f27
renderer/metal: minimum contrast ratio is configurable
2023-12-01 21:24:38 -08:00
Mitchell Hashimoto
6c859cca82
renderer/metal: minimum contrast experiment
...
This uses WCAG2 algorithms with a minimum ratio hardcoded of 3:1. This
is not shippable in its current state because we want the ratio to be
configurable and I'm not happy with the way data is being sent to the
shader.
2023-12-01 20:51:16 -08:00
Mitchell Hashimoto
d1de53ed22
renderer/opengl: correct shader params
2023-11-19 22:52:40 -08:00
Mitchell Hashimoto
64cacce1cf
renderer/opengl: setup image uniforms
2023-11-19 22:33:06 -08:00
Mitchell Hashimoto
8253fc1f31
renderer/opengl: shaders only need one color input
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
2db36646ac
renderer/opengl: some comments
2023-11-17 21:51:07 -08:00
Mitchell Hashimoto
5c7bad2f7d
renderer/opengl: resize the screen texture
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
47971e7663
renderer/opengl: setup uniform buffer objects for custom shaders
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
5fc91401f2
renderer/opengl: draw custom shaders, simplified
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
aff5090362
renderer/opengl: simplifying the custom shader to get things working
2023-11-17 21:51:06 -08:00
Mitchell Hashimoto
46dd084ee9
renderer/opengl: wip
2023-11-17 21:51:05 -08:00
Mitchell Hashimoto
3a17ac48cf
prettier: ignore shaders
2023-11-17 21:50:53 -08:00
Mitchell Hashimoto
01a73994cb
renderer/metal: setup sampler state
2023-11-17 21:50:53 -08:00
Mitchell Hashimoto
1bd92619b1
renderer: shadertoy functions
2023-11-17 21:50:35 -08:00
Mitchell Hashimoto
c347148fd7
renderer/metal: CRT effect, ugly hacky code
2023-11-17 21:50:34 -08:00
Mitchell Hashimoto
a5066635f0
renderer: do not downsample oversized glyphs
...
Fixes #696
We should rely on the rasterizer to create glyphs of the proper size,
including doing CPU resizing if necessary.
2023-10-17 10:55:04 -07:00
Mitchell Hashimoto
0918731d9a
renderer/metal: need to set proper alpha for fg mode in shader
...
Fixes #673
2023-10-16 12:22:51 -07:00
Mitchell Hashimoto
e0ee5d1763
Revert "Merge pull request #322 from mitchellh/big-glyphs"
...
This reverts commit 0ffbab00a42ba0fb9a3f2aa02428760df61d03d3, reversing
changes made to 6751087bead34efe1684997503c3764a63607397.
2023-08-24 21:05:33 -07:00
Mitchell Hashimoto
aad4bdb32a
renderer/opengl: glyphs that are too wide should be scaled down
...
U+226A is 1-char wide according to the Unicode database but renders very
wide in many fonts. This causes it to leak outside of its grid cell. We
should scale down by x the same way we scale down by y.
2023-08-24 14:19:38 -07:00
Mitchell Hashimoto
7ff76ca00d
terminal/kitty-gfx: respect display c/r params
2023-08-22 14:43:50 -07:00
Mitchell Hashimoto
3bbfee676b
terminal/kitty-gfx: process source rectangle display params
2023-08-22 14:33:41 -07:00
Mitchell Hashimoto
84c72bbe46
renderer/metal: honor cell offset graphics command
2023-08-22 13:28:40 -07:00
Mitchell Hashimoto
5a9bbcbc2d
renderer/metal: clip image if necessary off top of viewport (scrolling)
2023-08-22 11:32:45 -07:00
Mitchell Hashimoto
cb70d86c00
renderer/metal: emit draw calls for images
2023-08-22 10:12:40 -07:00
Mitchell Hashimoto
e665fc6741
renderer/metal: first pass at an image shader
2023-08-22 09:20:30 -07:00
Mitchell Hashimoto
0ca6957d0c
renderer/{metal,opengl}: need to premult our cell alpha to have effect
2023-08-18 18:38:47 -07:00
Mitchell Hashimoto
cf519bcd75
Use procedurally generated sprites for cursors rather than shaders
2023-03-04 15:14:10 -08:00
Mitchell Hashimoto
60b2603304
metal: premult alpha for fg color
2023-02-24 08:39:55 -08:00
Mitchell Hashimoto
35cb9d20b1
opengl: use premult alpha on fg color to avoid dark edges
...
This avoids an issue I only see in some renderers where the edges of
textures show up with a blurry border. Reading here:
https://www.realtimerendering.com/blog/gpus-prefer-premultiplication/
2023-02-24 07:57:50 -08:00
Mitchell Hashimoto
379072566f
remove underline support from shaders since we now use sprites
2022-11-27 16:18:00 -08:00
Mitchell Hashimoto
18de7cd2ef
Move shaders into the renderer dir
2022-11-15 13:10:43 -08:00