The <feDisplacementMap>
SVG filter primitive uses the pixel values from the image from in2
to spatially displace the image from in
.
The formula for the transformation looks like this:
P'(x,y) ← P(x + scale * (XC(x,y) - 0.5), y + scale * (YC(x,y) - 0.5))
where P(x,y)
is the input image, in
, and P'(x,y)
is the destination. XC(x,y)
and YC(x,y)
are the component values of the channel designated by xChannelSelector
and yChannelSelector
.