Function vizia::vg::image_filters::distant_lit_specular

pub fn distant_lit_specular(
    direction: impl Into<Point3>,
    light_color: impl Into<Color>,
    surface_scale: f32,
    ks: f32,
    shininess: f32,
    input: impl Into<Option<RCHandle<SkImageFilter>>>,
    crop_rect: impl Into<CropRect>,
) -> Option<RCHandle<SkImageFilter>>
Expand description

Create a filter that calculates the specular illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors).

  • direction - The direction to the distance light.
  • light_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 None.
  • crop_rect - Optional rectangle that crops the input and output.