boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
an3223 has quit [Remote host closed the connection]
an3223 has joined #foot
andyrtr has quit [Ping timeout: 260 seconds]
andyrtr has joined #foot
andyrtr_ has joined #foot
ptrc has quit [Remote host closed the connection]
andyrtr has quit [Ping timeout: 252 seconds]
ptrc has joined #foot
andyrtr_ is now known as andyrtr
andyrtr_ has joined #foot
andyrtr has quit [Ping timeout: 252 seconds]
andyrtr_ is now known as andyrtr
andyrtr_ has joined #foot
andyrtr has quit [Ping timeout: 265 seconds]
andyrtr_ is now known as andyrtr
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
andyrtr_ has joined #foot
andyrtr has quit [Ping timeout: 248 seconds]
andyrtr_ is now known as andyrtr
<dnkl>
rnd: ifreund: benchmark results for the srgb branch compared to the master branch: https://0x0.st/8TWE.txt
<dnkl>
too slow to be useful atm. But if we can offload the final linear -> sRGB translation to the GPU, via the compositor, then I think it'll be useable
<ifreund>
nice, at some point I should try and learn enough about color management to help push things forward on the wlroots side
andyrtr_ has joined #foot
andyrtr has quit [Read error: Connection reset by peer]
andyrtr_ is now known as andyrtr
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
<emersion>
dnkl: the reason one usually wants to send electrical values instead of optical, is precision
<emersion>
with an 8-bit buffer and optical values you can notice banding
<emersion>
you should be able to tag your content with the "ext_linear" TF if you want to try it out
<OtzmaVindicus>
how does foot choose fonts? does it respect ~/.config/fontconfig/font.conf?
<OtzmaVindicus>
/.config/fontconfig/fonts.conf?
<OtzmaVindicus>
~
<dnkl>
emersion: thanks! I see there's an open wlroots PR for color management? I assume that's the one I need?
<dnkl>
OtzmaVindicus: via fontconfig, so yes it should respect that. You should be able to verify with e.g fc-match
<emersion>
i can try to hack up something if you want to try it out
<emersion>
(it only supports the HDR toys)
<emersion>
how difficult would it be to use 10-bit, or fp16?
<OtzmaVindicus>
"fc-match x" would tell me the font that letter "x" is displayed in?
<dnkl>
emersion: for the basics, not too hard I think, depending on which pixman primitives are available. There are a few places that write 32-bit ARGB directly, but not a lot.
<dnkl>
if "all" I need to do is set a tag, then yes, I would be interested :)
<dnkl>
it would at the very least tell me if this is something worth pursuing for real, or something I should just drop
<dnkl>
OtzmaVindicus: no, fc-match tells you which font is returned, named x
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
<OtzmaVindicus>
how to test how a particular symbol is rendered in a particular font?
<dnkl>
assuming it's not part of the primary font, the easiest solution is maybe to run foot with -d info. It'll log the font when it's loaded on demand (i.e the first time a glyph is displayed)
andyrtr has quit [Ping timeout: 260 seconds]
andyrtr has joined #foot
boomboxnation has quit [Read error: Connection reset by peer]
<emersion>
requires WLR_RENDERER=vulkan, and untested
<dnkl>
emersion: thanks, will hopefully be able to test it next week
<emersion>
let me know if you have more questions or run into issues :P
<dnkl>
will do! can't imagine any issues though :)
<emersion>
lol
mtm has joined #foot
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
<dnkl>
emersion: I'm able to create an image description object, with the ext_linear named TF set (and validated by the compositor, since I got a protocol error when I forgot to set the primaries). But later, when trying to get a color_management_surface (to set the description on), I get disconnected. Nothing obvious in the sway logs, and no visible protocol error (could still be one though)
<dnkl>
I'm using wp_color_manager_v1_get_surface()
<dnkl>
it's complex protocol and I'm sure I'm doing something wrong, I just don't see what...
<emersion>
hm, weird that you don't get anything
<emersion>
can you share a WAYLAND_DEBUG log? and to your code?
<dnkl>
I do have one question though... the primaries; I just guessed, and set it to PRIMARIES_SRGB. Is that right or wrong?
<emersion>
that's a good question
<dnkl>
:)
<emersion>
ah, no, sRGB primaries are completely fine
<emersion>
the TF is a more blurry area
<emersion>
rn wlroots advertises the srgb TF, but i think we should advertise bt1886 instead
<dnkl>
thanks. Other than that, is there something else I should be doing? I'm thinking I should listen for advertised TFs, and not just blindly set ext_linear? Anything else?
<emersion>
check for the parametric feature
<dnkl>
ah, ok, will do
<emersion>
other than that, i think it should be fine
<emersion>
also check for the srgb primaries, just in case
<emersion>
(check whether the compositor supports that)
<dnkl>
awesome, thanks a bunch! Got to go now, but I'll try to clean up my quick POC in the next couple of days
<emersion>
nice :)
<emersion>
yeah, the protocol is easy to use if all you want is push content with fixed primaries/TF
<j`ey>
so before this, foot just gives a single surface, but after this.. it gives a surface for the text and bg and asks to blend?
OtzmaVindicus has quit [Quit: levaya]
<j`ey>
or is it more granular
OtzmaVindicus has joined #foot
<dnkl>
no, still a single surface. just differently encoded
<j`ey>
oh I thought it was asking the compositor to blend stuff or somethingsomething
<emersion>
also i'd suggest to try to paint a gradient via sixel or sth and check for banding
<dnkl>
will try that. Right now it's still 8-bit only, but after landing initial support, I hope to be able to test higher resolution buffers too
<dnkl>
j`ey: no, we need to blend ourselves. But that's nothing new. The really compute intensive part is doing a color space translation for every modified pixel. This is what's being offloaded with the color management protocol
<emersion>
is premult alpha getting in your way, or does that not matter?
<emersion>
it would be really nice to dust off that wlroots MR to upload shm buffers in a separate thread to not block the compositor…
<dnkl>
emersion: not yet... but I've not spent a lot of time verifying transparency. It _looks_ ok, at a quick glance
<emersion>
there's a difference between doing the premult before vs after srgb encoding
<emersion>
wayland assumes premult after srgb encoding
<emersion>
IOW: premult on electrical values
<emersion>
none of that matters if you're using ext_linear TF :P
<emersion>
i was mostly wondering if you were doing alpha premult as a post-processing step
<emersion>
right, but when you need to blend, you're using these values directly?
<dnkl>
the linearly translated and pre-multiplied values, yes :)
<emersion>
that function lgtm
<emersion>
"linearly translated"?
<dnkl>
all input colors (from config, or ANSI escapes) are treated as sRGB, and translated before being used in any pixman calls (be it to fill the background, it blend glyphs or sixels)
<emersion>
oh
<emersion>
we call it "encoding"
<dnkl>
new to this 😅
<emersion>
yeah it's a whole lot of new words
<dnkl>
still figuring out what everything is supposed to be called