Re: [csswg-drafts] [css-color] [filter-effects] Should no-op filters produce different output from no filter? (#7100)

The CSS Working Group just discussed `[css-color] [filter-effects] Should no-op filters produce different output from no filter?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> topic: [css-color] [filter-effects] Should no-op filters produce different output from no filter?<br>
&lt;fantasai> github: [css-color] [filter-effects] Should no-op filters produce different output from no filter?<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7100<br>
&lt;fantasai> smfr: Issue here is that CSS filters are specified to use sRGB as their color interpolation model<br>
&lt;chris> they use linear-light sRGB<br>
&lt;fantasai> smfr: This is a problem when authors apply filters to colors outside of sRGB gamut<br>
&lt;fantasai> smfr: e.g. display-p3 or color specified with LCH color space<br>
&lt;chris> q+<br>
&lt;fantasai> smfr: This is important because often authors will apply no-op filters, with intent to animate later<br>
&lt;fantasai> smfr: This means such filters will flatten the colors<br>
&lt;fantasai> smfr: In testing, looked like Chrome isn't doing this: they allow out-of-sRGB colors through filters<br>
&lt;fantasai> smfr: WebKit does limit colors to sRGB<br>
&lt;fantasai> smfr: Don't think this is desriable<br>
&lt;fantasai> smfr: One, I think authors expect no-op filters to not have an effect<br>
&lt;fantasai> smfr: And second as an implementer, I'd like to optimize away such filters by not doing anything special<br>
&lt;fantasai> smfr: Since CSS specifies sRGB compositing and filters are specified to do this also<br>
&lt;fantasai> smfr: CSS uses non-linear sRGB<br>
&lt;fantasai> smfr: so I'm not sure how to resolve this, because I don't think we specify our color compositing model in a way that matches browsers<br>
&lt;Rossen_> q<br>
&lt;fantasai> smfr: maybe Chris has an opinion<br>
&lt;fantasai> chris: Correct that filters use sRGB and clamp at each stage in the pipeline<br>
&lt;Rossen_> ack chris<br>
&lt;fantasai> chris: They do use linear-light sRGB<br>
&lt;fantasai> chris: They don't use gamut-?? values<br>
&lt;fantasai> chris: Very obvious when you're doing it wrong<br>
&lt;smfr> s/gamut-??/gamut-encoded/<br>
&lt;fantasai> chris: I suggested a way forward for this, beefing up filters to have a wider color gamut<br>
&lt;fantasai> chris: Simon said very nice, but doesn't solve my issue which is no-op filter<br>
&lt;fantasai> chris: My concern about is that as soon as someone starts to animate, from 0 to 0.01, then there's a sudden change<br>
&lt;fantasai> chris: I can see that it would help with no-op filters, but not with an animation case<br>
&lt;fantasai> smfr: That's very true, and that's why I think we need to specify that CSS filters interpolate in the working color space, so that they don't truncate colors?<br>
&lt;fantasai> chris: The concept of a working color space isn't well-defined<br>
&lt;fantasai> chris: we have different ones for different operations<br>
&lt;fantasai> chris: Talkinga bout compositing, but not just compositing, it's also the convesion from luminance or conversion from saturation, all use constants from sRGB and not display-p3<br>
&lt;fantasai> chris: need to fix that, and the way to fix that is to continue using sRGB ones, and because in linear-light make them extended, and in that way can represent all other colors as well<br>
&lt;fantasai> chris: I think that's the best minimal change, otherwise you have [problems]<br>
&lt;fantasai> smfr: That would be fine...<br>
&lt;Rossen_> q?<br>
&lt;fantasai> chris: If we can bash this out, would be great<br>
&lt;fantasai> smfr: Would be interested in hearing from Chromium and Gecko, what their filter color space is<br>
&lt;fantasai> chrishtr: I'll have to check<br>
&lt;fantasai> emilio: same here<br>
&lt;fantasai> emilio: but pretty sure we have code to optimize away no-op filters<br>
&lt;fantasai> Rossen_: so, do more investigation on Chrome and Gecko side and then come back to this?<br>
&lt;fantasai> chris, smfr: sounds fine<br>
&lt;chrishtr> will investigate<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7100#issuecomment-1104151454 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 April 2022 16:38:32 UTC