SVG feDiffuseLighting Element (original) (raw)
Last Updated : 6 Apr, 2022
The SVG filter primitive lights an image using the alpha channel as a bump map. Using diffuse lighting the sides of the object facing the light are brighter and the sides facing away are darker and in shadow.
Syntax :
Contents...
Attributes:
- in —The in attribute identifies input for the given filter primitive.
- surfaceScale — It represents the height of the surface. Its value is multiplied by the alpha value. Default value is 1.
- diffuseConstant — It is a non-negative number whose default value is 1.
- kernelUnitLength — It tells the intended distance between successive columns and rows in the kernelMatrix. The intended distance is represented in current filter units. Default value is 1.
Example 1:
HTML `
`
Output:
Example 2:
HTML `
`
Output: