Re: Updated filters specification

On Thu, Apr 28, 2011 at 9:19 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Fri, Apr 29, 2011 at 6:11 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> can you show me an example where this is used?
>> As was stated before in this thread, the effect of 'enable-background'
>> could be emulated by just rearranging the content.
>>
>> "filtering" 2 images together really sounds like blending to me and as
>> such should go into the blending spec. If that spec is not able to produce
>> this effect (and you believe that this is a required feature) then the
>> future CSS compositing specification should address it.
>>
>
> <filter id="blurBackground">
>   <feGaussianBlur in="BackgroundImage" stdDeviation="4"/>
>   <feComposite in="SourceImage"/>
> </filter>
> ... lots of HTML content ...
>   <div style="position:fixed; filter:url(#blurBackground)">...</div>
>
> The background behind the <div> is blurred and the contents of the div are
> drawn on top. You do not want to have to rearrange the content to get this
> effect. I suppose you could address this in the compositing specification by
> adding a special 'composite-background-blur' property, or something like
> that, but how about this variant:
>
> <filter id="rippleBackground">
>   <feDisplacementMap in="BackgroundImage" in2="ripples.png"/>
>   <feComposite in="SourceImage"/>
> </filter>
>
> This would apply a ripple effect to the background before drawing the div
> on top, Hopefully we don't want to have that sort of effect in the
> compositing spec.
>

If the compositing spec were to allow GLSL/OpenCL constructs, then this
effect should be possible. (One could argue that CSS blending should ONLY be
done with shaders and that the known blendmodes would be built-in shader
programs.)

My fear is that when you start pulling in the background with filters and
you don't specify exactly what region or artwork you are affecting, there
will be multiple interpretations. The SVG compositing spec nicely defines
how this should work.

Rik

Received on Saturday, 30 April 2011 16:54:44 UTC