Class TurbulenceEffect.Props
- Namespace
- PaintDotNet.Direct2D1.Effects
- Assembly
- PaintDotNet.Windows.Core.dll
public sealed class TurbulenceEffect.Props : DeviceEffectProperties
- Inheritance
-
TurbulenceEffect.Props
- Inherited Members
Constructors
Properties
- BaseFrequency
The base frequencies in the X and Y direction. This property is a float and must be greater than 0. The units are specified in 1/DIPs. A value of 1 (1/DIPs) for the base frequency results in the Perlin noise completing an entire cycle between two pixels. The ease interpolation for these pixels results in completely random pixels, since there is no correlation between the pixels. A value of 0.1(1/DIPs) for the base frequency, the Perlin noise function repeats every 10 DIPs. This results in correlation between pixels and the typical turbulence effect is visible.
The default value is { 0.01f, 0.01f }.
- ClassID
Implemented by the derived class to specify the effect's class ID (CLSID) when registering and creating the effect and for binding to an IDeviceEffectProperties.
Note that this is different than the ID property accessor, which queries the IDeviceEffectProperties for the actual runtime effect class ID.
Overriding this property is only necessary in advanced scenarios, such as when wrapping an existing effect (e.g. built-in Direct2D effects), or when working with CustomEffects that have their own generic type arguments (e.g. PixelShaderEffect).
- Noise
Specifies the turbulence noise mode. The default value is TurbulenceNoise.FractalSum.
- Octaves
The number of octaves for the noise function. This value must be greater than 0.
The default value is 1.
- Offset
The coordinates where the turbulence output is generated.
The algorithm used to generate the Perlin noise is position dependent, so a different offset results in a different output. This property is not bounded and the units are specified in DIPs.
The default value is { 0, 0 }.
- Seed
The seed for the pseudo random generator. This property is unbounded, and may be negative.
- Size
The size of the turbulence output.
This property is not bounded and the units are specified in DIPs.
The default value is { 0, 0 }.
- Stitchable
Turns stitching on or off. The base frequency is adjusted so that output bitmap can be stitched. This is useful if you want to tile multiple copies of the turbulence effect output.
When set to true, the output bitmap can be tiled (using the tile effect) without the apperance of seams. The base frequency is adjusted so that the output can be stitched.
When set to false, the base frequency is not adjusted, so seams may appear between tiles if the bitmap is tiled.
The default value is false.