feSpecularLighting {gridSVG} | R Documentation |
Light an image using the alpha channel as a bump map.
Description
This filter primitive lights a source graphic using the alpha channel as a bump map. The resulting image is an RGBA image based on the light colour. The lighting calculation follows the standard specular component of the Phong lighting model. The resulting image depends on the light colour, light position and surface geometry of the input bump map. The result of the lighting calculation is added. The filter primitive assumes that the viewer is at infinity in the z direction (i.e., the unit vector in the eye direction is (0,0,1) everywhere).
This filter primitive produces an image which contains the specular
reflection part of the lighting calculation. Such a map is intended to
be combined with a texture using the add term of the arithmetic method
in feComposite
. Multiple light sources can be simulated
by adding several of these light maps before applying it to the
texture image.
Usage
feSpecularLighting(input = NA,
surfaceScale = 1, specularConstant = 1,
specularExponent = 1, kernelUnitLength = NA,
col = "white", lightSource = NULL, ...)
Arguments
input |
Identifies an input for this filter primtive. See
|
surfaceScale |
Scale applied to the input alpha surface. |
specularConstant |
|
specularExponent |
Numeric exponent for specular term, larger is more "shiny". Range [1,128]. |
kernelUnitLength |
The first number is the |
col |
The colour to apply to the light from |
lightSource |
A light source object, produced by one of
|
... |
Further arguments to be passed onto |
Details
For more information about this primitive, consult the reference to the SVG specification.
Value
An fe.specular.lighting
object.
Author(s)
Simon Potter
References
https://www.w3.org/TR/SVG/filters.html#feSpecularLightingElement
See Also
filterEffect
fe
,
feDistantLight
, fePointLight
,
feSpotLight
.