ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
<emersion> the effect is even more noticeable without the multiplier
ezzieyguywuf has joined #wayland
<ezzieyguywuf> I noticed that my package manager installs some (all?) of the wayland xml files for me to use in wayland-scanner. Is there a cross-distro way to find these xml files? I'd like to set up a build script to generate the c bindings in my project
<emersion> aka "the lipstick shader"
user21_ has joined #wayland
<zamundaaa[m]> hah
<zamundaaa[m]> Judging by the image, something's definitely wrong with the transfer function
<emersion> I compared it with kwin on shadertoy (half screen wlr, other kwin) and it's exactly the same
<emersion> also forcing sRGB in the shader and the issue is still here
<zamundaaa[m]> wdym with "kwin on shadertoy"?
<emersion> grabbed linearToPq() from kwin
<emersion> from colormanagement.glsl
<emersion> then used to render a gradient, half of it with wlroots' function, other with kwin, and both sides looked the same
<emersion> (the functions are very similar either way)
<zamundaaa[m]> okay
<emersion> so i've ruled out the matrix and the TF, not sure what else could go wrong...
Calandracas_ has joined #wayland
Calandracas has quit [Ping timeout: 480 seconds]
<zamundaaa[m]> emersion: I took a look at your shader, and the TF does not look right
<zamundaaa[m]> You're applying the sRGB TF, and then the modified PQ inverse TF from KWin - which has as input [0; 1]
<zamundaaa[m]> PQ is [0; 10000] nits though, so that's mapping sRGB white to 10k nits
andyrtr has quit [Ping timeout: 480 seconds]
Calandracas_ has quit [Remote host closed the connection]
Calandracas_ has joined #wayland
<wlb> weston Issue #991 opened by n3rdopolis (n3rdopolis) Odd linker error in Debian Testing https://gitlab.freedesktop.org/wayland/weston/-/issues/991
garnacho has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
Moprius has quit [Remote host closed the connection]
kts has joined #wayland
glennk has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Ping timeout: 480 seconds]
feaneron has quit [Ping timeout: 480 seconds]
dri-logger has quit [Ping timeout: 480 seconds]
dri-logger has joined #wayland
dri-logg1r has joined #wayland
eluks has quit [Remote host closed the connection]
eluks has joined #wayland
lockywolf has joined #wayland
dri-logger has quit [Ping timeout: 480 seconds]
ybogdano has quit [Remote host closed the connection]
ybogdano has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
m5zs7k has quit [Ping timeout: 480 seconds]
Sid127 has joined #wayland
m5zs7k has joined #wayland
andyrtr has joined #wayland
mehdix has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
mehdix has joined #wayland
kts has quit [Remote host closed the connection]
kts has joined #wayland
kts has quit [Quit: Leaving]
<emersion> zamundaaa[m]: isn't that just a multiplier?
<emersion> decode sRGB to linear, blend, convert sRGB primaries to BT2020, (multiply), encode to PQ?
karenw has quit [Ping timeout: 480 seconds]
garnacho has joined #wayland
tzimmermann has joined #wayland
andyrtr has quit [Quit: ZNC 1.9.1 - https://znc.in]
andyrtr has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
leon-anavi has joined #wayland
rgallaispou has quit [Read error: Connection reset by peer]
iomari891 has joined #wayland
rgallaispou has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
pavlushka has joined #wayland
rasterman has joined #wayland
lsd|2 has joined #wayland
grinja3 has quit [Remote host closed the connection]
grinja3 has joined #wayland
lsd|2 has quit [Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/]
glennk has joined #wayland
sima has joined #wayland
pavlushka has quit [Ping timeout: 480 seconds]
garnacho has quit [Ping timeout: 480 seconds]
<emersion> btw, what is the srgb/gamma22 thing again?
<emersion> should i decode surfaces with srgb, then encode with gamma22?
<emersion> hm, or rather the opposite: decode with gamma22, encode with srgb?
<emersion> or just always use gamma22?
Moprius has joined #wayland
<JEEB> that's the fun bit with mismatching OETF|EOTF
<JEEB> but if you are making content to be displayed as G22 (which the sRGB reference display is), then encoding that as G22 would make sense
<JEEB> windows decodes it as sRGB split trc
<JEEB> macOS lets you pick your poison for unmarked SDR surfaces :D
<zamundaaa[m]> emersion: technically speaking, sure, but the difference is the concept of how it's supposed to work
<zamundaaa[m]> Going from the content (SDR or HDR), you calculate some brightness of the content, and then send that to the screen, encoded as PQ
<zamundaaa[m]> A multiplier is just messing around and hoping something works out, but with cd/m^2 you have some actual numbers to work with
<JEEB> (this is generally only relevant for specified HDR output since most systems with the default SDR output just output unmarked SDR surfaces as-is)
pavlushka has joined #wayland
<emersion> let's say my SDR content is 80 cd/m2, and my HDR display has mastering display primaries set to 10k cd/m2
<emersion> i should just set the multiplier to 10k/80?
<emersion> (min_lum is zero in both cases)
<zamundaaa[m]> Mastering display luminance is irrelevant here
<emersion> okay, then assuming the SDR content is in [0; 1], multiply by 80 cd/m2?
<emersion> or is the multiplication expected to look bad?
<JEEB> if you are not doing HDR graphics white adjustment (which for testing and verification is OK), then you just do configuration and map that [0; 1] of [0, 80] nits to [0; 1] of [0; 10k] nits. then when you validate that, you add an argument which is the HDR graphics white
<emersion> that sounds like multiplying by 10k/80
<JEEB> the PQ trc is not linear I think?
<zamundaaa[m]> emersion: it would be multiplying by 80/10k
<JEEB> or wait, at this point are you in linear space
<JEEB> sorry
fmuellner has joined #wayland
<emersion> er, yeah, got it the other way around :P
<JEEB> and then when you add the HDR graphics white argument you can default it to 203 nits
<zamundaaa[m]> But look at the PQ inverse EOTF on Wikipedia. To get the idea of how this works, it's important to use the real one
<emersion> so, *2.03?
<JEEB> but yea, first validate without the HDR graphics white adjustment
<zamundaaa[m]> KWin only has the one with [0; 1] input range because it allows custom luminance levels for PQ internally
<JEEB> I recall getting bad results with plain *2.03 but I might have been poking at the wrong values in mpv back then ^^; also it's a question of whether you consider it nits to nits (sRGB is supposed to be 80 nits, not 100 nits) or just "this is graphics white, whatever the nits - and it should get mapped to VALUE_FOR_203_NITS
<JEEB> *VALUE_FOR_HDR_GRAPHICS_WHITE
<emersion> so… essentially i should fix the multiplier and it should Just Work?
Brainium has joined #wayland
pavlushka has quit [Ping timeout: 480 seconds]
<bitblt> hello there
<bitblt> these last days I was trying to find out the cause of a slight (but really annoying) blurrying problem in native wayland applications
<bitblt> I think I've found a problem in the fractional-scale-v1 protocol
<bitblt> in order to be sure, I wrote a minimal poc wayland client that uses fractional scaling and renders some text with a bitmap font
<bitblt> when resizing or moving pixel by pixel the toplevel window, for some positions and sizes the content becomes blurry
<bitblt> I can reproduce this issue with many other client applications like foot and alacritty too
<bitblt> I tracked this down, and it seems that some compositors (like the wlroot based ones) use position based scaling for toplevel window width and height:
<bitblt> this is a problem, given that the wayland clients do not (and cannot) know their position
<bitblt> so when calculating the (scaled) buffer size, for some window positions/sizes there might be a mismatch of about 1 pixels or more
<bitblt> this causes blurriness, because the toplevel window is forced to scale up or down the client buffer that will possibly have different size
<bitblt> this happens because the client calculates the buffer size just by using the scaling factor, which leads to discrepancies with the window size
<bitblt> I suppose this can be solved with 2 ways: either the protocol will specify the window scaling algorithm to be position agnostic and clients must implement the exact same algorithm to scale their buffers
<bitblt> or the protocol must be modified to return a suggested content buffer size alongside the scale, and this will be calculated (scaled) by the compositor in order for both the window and the content buffer to be the same size
<kchibisov> bitblt: it's an issue in your compositor.
<kchibisov> nothing is position dependent.
<bitblt> kchibisov: so the above code in wlroots is incorrect?
<kchibisov> yes, it's a bug.
<bitblt> emersion: have you thought about this?
<bitblt> can I help somehow fix this?
<bitblt> kchibisov: what would be the correct way to calculate the scaled width and height in this case according to the spec then?
<kchibisov> protocol says how you do so.
<kchibisov> there's also a PR to specify the exact formula.
mvlad has joined #wayland
<bitblt> a pr in wayland protocols or in wlroots?
<kchibisov> protocols.
<bitblt> I saw that you opened an issue in wlroots here about this: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3705 but it got rejected by Nefsen402
<kchibisov> because sway wasn't using wlr_scene back then.
<kchibisov> now it uses and has this bug again.
<bitblt> I suppose this was lack of understanding or it was unspecified back then?
<bitblt> ah I see
<JEEB> emersion: had a walk and basically I think if you are dealing with linear content it ends up in either case being LINEAR_SDR_VALUE * (HDR_GRAPHICS_WHITE_NITS / HDR_MAX_VALUE_NITS) when your output linear is in specific HDR nits like with PQ. since even if you first do for example ({80,100} / 10k) and then multiply by (HDR_GRAPHICS_WHITE_NITS / {80,100})
kts has joined #wayland
<bitblt> kchibisov: can specify the link to this pr that specifies the exact formula please?
rasterman has quit [Remote host closed the connection]
rasterman has joined #wayland
rasterman has quit [Remote host closed the connection]
rasterman has joined #wayland
feaneron has joined #wayland
bodiccea has quit [Ping timeout: 480 seconds]
gallo has joined #wayland
<wlb> wayland Merge request !452 opened by Daniel Stone (daniels) build: Add -lm to pkg-config dependencies https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/452
nerdopolis has joined #wayland
dviola has quit [Quit: WeeChat 4.5.1]
nerdopolis has quit [Ping timeout: 480 seconds]
iomari891 has joined #wayland
bodiccea has joined #wayland
kts has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
<emersion> daniels: sorry for the brainfart, should've read the commit message more carefully
<daniels> emersion: please let's not set a precedent of apologising every time we're wrong - my fingers would fall off from the amount of typing I'd need to do :)
<daniels> jadahl: wayland-devel@ are asking for your gracious and wise intervention (release w-p pls)
nerdopolis has quit [Ping timeout: 480 seconds]
<wlb> wayland-protocols/main: Xaver Hugl * stable/linux-dmabuf: clarify when the plane_set protocol error is sent https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/18a0117b9472 stable/linux-dmabuf/linux-dmabuf-v1.xml
<wlb> wayland-protocols Merge request !376 merged \o/ (stable/linux-dmabuf: clarify when the plane_set protocol error is sent https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/376)
feaneron has quit [Remote host closed the connection]
andyrtr has quit [Ping timeout: 480 seconds]
andyrtr has joined #wayland
feaneron has joined #wayland
andyrtr has quit [Quit: ZNC 1.9.1 - https://znc.in]
andyrtr has joined #wayland
kenny1 has quit []
kenny has joined #wayland
pavlushka has joined #wayland
nosmokefrom has joined #wayland
checkfoc_us9 has quit []
checkfoc_us9 has joined #wayland
coldfeet has joined #wayland
leon-anavi has quit [Quit: Leaving]
nosmokefrom has quit [Remote host closed the connection]
karenw has joined #wayland
_rgallaispou has joined #wayland
rasterman has quit [Remote host closed the connection]
sally has quit [Remote host closed the connection]
sally has joined #wayland
rasterman has joined #wayland
tzimmermann has quit [Quit: Leaving]
rasterman has quit [Remote host closed the connection]
bodiccea has quit [Remote host closed the connection]
bodiccea has joined #wayland
Brainium has quit [Quit: Konversation terminated!]
rasterman has joined #wayland
pavlushka has quit [Ping timeout: 480 seconds]
bodiccea_ has joined #wayland
bodiccea has quit [Ping timeout: 480 seconds]
_rgallaispou has quit [Ping timeout: 480 seconds]
pavlushka has joined #wayland
user21_ has quit [Quit: Leaving]
nerdopolis has joined #wayland
bnason2 has quit [Ping timeout: 480 seconds]
bnason2 has joined #wayland
karolherbst has quit [Read error: Connection reset by peer]
karolherbst4 has joined #wayland
karolherbst4 has quit []
karolherbst has joined #wayland
pavlushka has quit [Ping timeout: 480 seconds]
Calandracas_ has quit [Read error: Connection reset by peer]
Calandracas has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
bodiccea_ has quit [Remote host closed the connection]
bodiccea_ has joined #wayland
bodiccea has joined #wayland
bodiccea_ has quit [Ping timeout: 480 seconds]
glennk has quit [Remote host closed the connection]
feaneron has quit [Quit: feaneron]
glennk has joined #wayland
latex has quit [Read error: No route to host]
grinja3 has quit [Remote host closed the connection]
grinja3 has joined #wayland
latex has joined #wayland
coldfeet has quit [Quit: Lost terminal]
mvlad has quit [Remote host closed the connection]
bodiccea_ has joined #wayland
bodiccea has quit [Ping timeout: 480 seconds]
ohogb has joined #wayland
ohogb has quit []
Brainium has joined #wayland
garnacho has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
garnacho has joined #wayland
kestrel has joined #wayland
garnacho has quit [Quit: garnacho]
garnacho has joined #wayland
grinja4 has joined #wayland
grinja3 has quit [Remote host closed the connection]
sima has quit [Ping timeout: 480 seconds]
garnacho has quit [Ping timeout: 480 seconds]