[fxtf-drafts] [filter-effects-1] Is WPT test for accumulate correct? (#371)

stephenmcgruer has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [filter-effects-1] Is WPT test for accumulate correct? ==
I am currently working on implementing 'accumulate' composite support for filter in Chromium, and am having trouble resolving what I am reading in the spec and the associated WPT test.

From the spec, it appears that accumulation is just equivalent to replace (https://drafts.fxtf.org/filter-effects-1/#accumulation):

`Given two filter values Va and Vb, returns the filter value, Vb.`

Is that a correct reading? The WPT test (and Firefox's implementation) appears to combine the values via addition - https://github.com/web-platform-tests/wpt/blob/7c50c216081d6ea3c9afe553ee7b64534020a1b2/web-animations/animation-model/animation-types/property-types.js#L2245. It expects that:

`accumulate(blur(10px) brightness(0.3), blur(20px) brightness(0.1)) == blur(30px) brightness(0)`

With the justification that:

```// brightness(0.1) onto brightness(0.3) means
// brightness((0.1 - 1.0) + (0.3 - 1.0) + 1.0). The result of this formula
// is brightness(-0.6) that means brightness(0.0).```

Neither the blur calculation (which looks like explicit addition) or the brightness behavior (which looks like some sort of interpolation?) appears correct if I am reading the spec correctly.


Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/371 using your GitHub account

Received on Wednesday, 11 September 2019 14:39:29 UTC