VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-fediffuselighting-element/

⇱ SVG feDiffuseLighting Element - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG feDiffuseLighting Element

Last Updated : 6 Apr, 2022

The SVG <feDiffuseLighting> 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 :

<feDiffuseLighting> Contents... </feDiffuseLighting>

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:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: