Skip to main content

Module shaders

Module shaders 

Expand description

Shader factory functions and Shader convenience constructors, re-exported from crate::shader::shaders.

Functions§

blend
color
color_in_space
coord_clamp
empty
fractal_noise
Creates Perlin noise of the given type (fractal noise or turbulence — see self::turbulence()). Both base frequencies (X and Y) have a usual range of (0..1) and must be non-negative.
image
Create an Shader that will sample the ‘image’. This is equivalent to Image::to_shader.
linear_gradient
Returns a shader that generates a linear gradient between the two specified points.
radial_gradient
Returns a shader that generates a radial gradient given the center and radius.
raw_image
Create an Shader that will sample ‘image’ with minimal processing. This is equivalent to Image::to_raw_shader.
sweep_gradient
Returns a shader that generates a sweep gradient given a center.
turbulence
Creates Perlin turbulence, see self::fractal_noise() for the parameter semantics.
two_point_conical_gradient
Returns a shader that generates a conical gradient given two circles.