feDiffuseLighting: Light an image using the alpha channel as a bump map.

Description Usage Arguments Details Value Author(s) References See Also

View source: R/filters.R

Description

This filter primitive lights an image using the alpha channel as a bump map. The resulting image is an RGBA opaque image based on the light colour with alpha = 1 everywhere. The lighting calculation follows the standard diffuse component of the Phong lighting model. The resulting image depends on the light colour, light position and surface geometry of the input bump map.

Usage

1
2
3
4
feDiffuseLighting(input = NA,
                  surfaceScale = 1, diffuseConstant = 1,
                  kernelUnitLength = NA, col = "white",
                  lightSource = NULL, ...)

Arguments

input

Identifies an input for this filter primtive. See filterInputs.

surfaceScale

Scale applied to the input alpha surface.

diffuseConstant

kd in the Phong lighting model. Must be non-negative.

kernelUnitLength

The first number is the dx value. The second number is the dy value. If the dy value is not specified, it defaults to the same value as dx. Indicates the intended distance in current filter units (i.e., units as determined by the value of parent filter container's primitiveUnits) for dx and dy, respectively, in the surface normal calculation formulas. By specifying value(s) for kernelUnitLength, the kernel becomes defined in a scalable, abstract coordinate system. If kernelUnitLength is not specified, the dx and dy values should represent very small deltas relative to a given (x,y) position, which might be implemented in some cases as one pixel in the intermediate image offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable.

col

The colour to apply to the light from lightSource.

lightSource

A light source object, produced by one of feDistantLight, fePointLight, or feSpotLight.

...

Further arguments to be passed onto fe.

Details

For more information about this primitive, consult the reference to the SVG specification.

Value

An fe.diffuse.lighting object.

Author(s)

Simon Potter

References

http://www.w3.org/TR/SVG/filters.html#feDiffuseLightingElement

See Also

filterEffect fe, feDistantLight, fePointLight, feSpotLight.


gridSVG documentation built on April 28, 2020, 9:05 a.m.