W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2013

Re: [filter-effects] feBlend filter (was: Re: [css-filters] feBlend filter)

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 30 May 2013 11:16:04 -0700
Message-ID: <CAGN7qDAJNFaCuN4KMxGWR56Q=SJaEPvFCj8WDVAvOnbD3s-NQQ@mail.gmail.com>
To: Michael Mullany <michael@sencha.com>
Cc: Dirk Schulze <dschulze@adobe.com>, "public-fx@w3.org" <public-fx@w3.org>, www-svg <www-svg@w3.org>
On Thu, May 30, 2013 at 10:49 AM, Michael Mullany <michael@sencha.com>wrote:

>
> On May 29, 2013, at 9:23 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>
>
> On Wed, May 29, 2013 at 8:35 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>
>>
>> On May 29, 2013, at 7:41 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>>
>> >
>> >
>> > On Wed, May 29, 2013 at 7:14 PM, Dirk Schulze <dschulze@adobe.com>
>> wrote:
>> >
>> > On May 29, 2013, at 6:59 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> >
>> > >
>> > >
>> > > On Wed, May 29, 2013 at 5:33 PM, Dirk Schulze <dschulze@adobe.com>
>> wrote:
>> > >
>> > > On May 29, 2013, at 5:05 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> > >
>> > > [snip]
>> > > > If we replace the formulas with the one without compositing, what
>> would it mean for blending two intermediate results?
>> > > > The result would exclude compositing completely. It is unclear how
>> this can be done.
>> > > >
>> > > > You'd have to explicitly call feComposite on the blended result.
>> > >
>> > > feComposite uses the alpha channel of the two input primitives.
>> feBlend the same, just that you loose the alpha channel on the result of
>> your feBlend (since the state is unclear).
>> > >
>> > > Why would you lose the alpha channel? Blending doesn't affect source
>> alpha (ár = ás)
>> > >
>> > > If the next primitive after feBlend is feGaussianBlur, what would be
>> blurred on the alpha channel? I do not think that you can easily separate
>> blending from compositing inside a SVG filter tree.
>> > >
>> > > Sure you can. feGaussianBlur would work the same except that the
>> source colors are now blended and alpha is unaffected.
>> >
>> > If ar = as, why would the alpha channel would not be affected on
>> blurring?
>> >
>> > If you do a gaussianBlur, its input regardless of it's blended or not,
>> will always have the same alpha values.
>> > A good question is if blurring after blending makes sense of course :-)
>>
>> You blur all channels, including the alpha channel for feGaussianBlur.
>> Since you say ar = as, this basically means source-in, doesn't it?
>>
>
> I'm unsure what you mean.
> Blending changes the color, but leaves the alpha. This result is fed into
> feGaussianBlur which will change the colors and the alpha. There's no
> 'compositing' happening...
>
>
> From the 1.1 spec:
>
> "For all feBlend modes, the result opacity is computed as follows:
>
> qr = 1 - (1-qa)*(1-qb)"
>
> (If either of the inputs is fully opaque then result is fully opaque.
> Perhaps this is what Dirk means?)
>

Yes, that's a result of doing the built-in 'source-over' of the current
feBlend filter.
However, if you remove the compositing step as I propose, the source alpha
won't change.
Received on Thursday, 30 May 2013 18:16:35 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 30 May 2013 18:16:35 UTC