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

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:37 UTC