Menu Home

feDiffuseLighting

osbo.com | SVG | Elements | feDiffuseLighting

The feDiffuseLighting SVG element specifies lighting an image using the alpha channel as a bump map.

The resulting image is an RGBA opaque image based on the light color with alpha = 1.0 everywhere. The lighting calculation follows the standard diffuse component of the Phong lighting model. The resulting image depends on the light color, light position and surface geometry of the input bump map.

Syntax

Attributes

diffuseConstant

Specifies kd in the Phong lighting model.

This can be any non-negative number.

Value
<number>
Default
1

in

Specifies the input for the filter primitive.

If no value is provided and this is the first filter primitive, then this filter primitive will use SourceGraphic as its input. If no value is provided and this is a subsequent filter primitive, then this filter primitive will use the result from the previous filter primitive as its input.

Value
SourceGraphic | SourceAlpha | BackgroundImage | BackgroundAlpha | FillPaint | StrokePaint | <filter-primitive-reference>
Default
SourceGraphic (or result)

surfaceScale

Specifies the height of the surface.

Value
<number>
Default
1

Examples

diffuseConstant

<number>

in

BackgroundAlpha

BackgroundImage

FillPaint

<filter-primitive-reference>

SourceAlpha

SourceGraphic

StrokePaint

surfaceScale

<number>

Internal

feBlend

feColorMatrix

feComponentTransfer

feComposite

feConvolveMatrix

feDisplacementMap

feDistantLight

feDropShadow

feFlood

feFuncA

feFuncB

feFuncG

feFuncR

feGaussianBlur

feImage

feMerge

feMergeMode

feMorphology

feOffset

fePointLight

feSpecularLighting

feSpotLight

feTile

feTurbulence

filter

External

World Wide Web Consortium (W3C)