SVG stands for Scalable Vector Graphic. It can be used to make graphics and animations like in HTML canvas.
The <feDisplacementMap> SVG filter primitive is use to spatially displace the image content using a displacement map. It takes two inputs to produce one result. The image content to displace is specified in the “in2” attribute. The content to which displacement effect is applied is reserved in “in” attribute.
<feDisplacementMap in2="" in="" scale="" xChannelSelector="" yChannelSelector=""/>
- in – It identifies input for the given filter primitive.
- in2 – It identifies the second input for the given filter primitive. It works exactly like the in attribute.
- scale – It defines the displacement scale factor to be used on a <feDisplacementMap> filter primitive.
- xChannelSelector -It indicates which color channel from in2 to used to displace the pixels in ‘in’ along the x-axis.
- yChannelSelector – Itindicates which color channel from in2 to used to displace the pixels in ‘in’ along the y-axis.