Function vizia::vg::image_filters::point_lit_diffuse

pub fn point_lit_diffuse(
    location: impl Into<Point3>,
    light_color: impl Into<Color>,
    surface_scale: f32,
    kd: f32,
    input: impl Into<Option<RCHandle<SkImageFilter>>>,
    crop_rect: impl Into<CropRect>,
) -> Option<RCHandle<SkImageFilter>>
Expand description

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

  • location - The location of the point light.
  • light_color - The color of the diffuse light source.
  • surface_scale - Scale factor to transform from alpha values to physical height.
  • kd - Diffuse reflectance coefficient.
  • 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.