pub fn spot_lit_specular(
location: impl Into<Point3>,
target: impl Into<Point3>,
falloff_exponent: scalar,
cutoff_angle: scalar,
light_color: impl Into<Color>,
surface_scale: scalar,
ks: scalar,
shininess: scalar,
input: impl Into<Option<ImageFilter>>,
crop_rect: impl Into<CropRect>,
) -> Option<ImageFilter>Expand description
Create a filter that calculates the specular illumination from a spot light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). The spot light is restricted to be within ‘cutoff_angle’ of the vector between the location and target.
location- The location of the spot light.target- The location that the spot light is point towardsfalloff_exponent- Exponential falloff parameter for illumination outside ofcutoff_anglecutoff_angle- Maximum angle from lighting direction that receives full lightlight_color- The color of the specular light source.surface_scale- Scale factor to transform from alpha values to physical height.ks- Specular reflectance coefficient.shininess- The specular exponent determining how shiny the surface is.input- The input filter that defines surface normals (as alpha), or uses the source bitmap when null.crop_rect- Optional rectangle that crops the input and output.