Table of Contents

Enum NoisePaintKind

Namespace
Egami.Drawing
Assembly
Egami.Drawing.dll

The kind of noise a NoisePaint makes.

public enum NoisePaintKind

Fields

Fractal = 0

SVG's fractalNoise: smooth clouds, each channel half the sum of the octaves' noise plus a half.

Simplex = 2

Simplex noise: smoother than the SVG kinds, with no grid-aligned artifacts; Egami's own, with no reference library.

Turbulence = 1

SVG's turbulence: the sum of the octaves' absolute noise, with sharp creases where it crosses zero.

Examples

using (RasterCanvas<Rgba8> canvas = raster.CreateCanvas())
{
    // SVG's feTurbulence fractal noise, stitched so a 128-pixel tile repeats without a seam, made gray by a color matrix.
    Paint stone = NoisePaint.Fractal(0.03f, 0.03f, octaves: 5, seed: 7, tileSize: new Size(128, 128))
        .WithColorMatrix(new ColorMatrix([0.3f, 0.6f, 0.1f, 0, 0, 0.3f, 0.6f, 0.1f, 0, 0, 0.3f, 0.6f, 0.1f, 0, 0, 0, 0, 0, 0, 1]));
    canvas.DrawPaint(stone);

    // Smooth simplex noise as a soft overlay.
    canvas.DrawPaint(NoisePaint.Simplex(0.01f, octaves: 3) with { BlendMode = BlendMode.Overlay, Opacity = 0.5f });
}