W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2014

[filter-effects] A piecewise filter

From: Paul LeBeau <paul.lebeau@gmail.com>
Date: Tue, 25 Mar 2014 20:52:46 +1300
Message-ID: <CACfsppCJGej+a_Pa71QsKp5UD5KHtXRE=gXtq8Qr3gjVkxJUAQ@mail.gmail.com>
To: "public-fx@w3.org" <public-fx@w3.org>

I was trying to help someone produce an equivalent of the "Overlay"
blending mode in Photoshop using SVG filters.  However, once I saw the
formula for it, it became obvious that it isn't really possible to
reproduce because of its piecewise nature.

I also notice that "Overlay" is missing from the Compositing and Blending
spec.  I'm curious why it was excluded considering almost all the other
ones are represented.

But anyway, it made me wonder whether it would make sense to add a new
filter type that would allow piecewise functions to be implemented.  For
example, "Overlay" could be implemented using a definition like the

<filter id="overlay">
  <fePiecewise in="SourceGraphic" channelSelector="A">
    <fePiecewiseNode min="0" max="0.5">
       <feComposite operator="arithmetic" k1="2" k2="0" k3="0" k4="0"/>
    <fePiecewiseNode min="0.5" max="1">
       <feComposite operator="arithmetic" k1="-2" k2="2" k3="2" k4="-1"/>


Received on Tuesday, 25 March 2014 07:53:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:48 UTC