I am trying to implement multiple shadows into a single SVG filter, but I find that my question is more general than this: how to add multiple effects to a single SVG filter? In my case, here is specifically what I'm trying to do.
I have an SVG document that currently contains one path element, and I applied one shadow effect to this element.
My SVG document
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1440" height="1750"> <defs> <filter id="dropshadow"> <feGaussianBlur in="SourceAlpha" stdDeviation="2.2"></feGaussianBlur> <feOffset dx="12" dy="12" result="offsetblur"></feOffset> <feFlood flood-color="rgba(0,0,0,0.5)"></feFlood> <feComposite in2="offsetblur" operator="in"></feComposite> <feMerge> <feMergeNode></feMergeNode> <feMergeNode in="SourceGraphic"></feMergeNode> </feMerge> </filter> </defs> <path xmlns:xlink="http://www.w3.org/1999/xlink" d="M 100 100 L 300 100 L 200 300 zz" fill="#2DA9D6" filter="url(#dropshadow)"></path> </svg>
Which gives me an SVG that looks like this:

Now I want to add a second (completely different) shadow to the same path element. For example, say a shadow that rises up and to the left of an element. In CSS, my whole shadow might look like this:
box-shadow: 5px 5px 5px rgba(0,0,0,0.5), -5px -5px 5px rgba(0,0,0,0.5);
How can I make these few shadows using SVG filters? I considered this question , which suggests including several effects in one filter, but I'm not sure how to combine several effects in one filter.
Thanks for any help!
source share