HypernovaDesktop Components · docs
Binarymission
WPFShaders Library › RadialBlurEffect

RadialBlurEffect

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Shaders.Library.CustomEffects

A pixel shader effect that smears its input along the line from each pixel towards a centre point - the streak a camera leaves when it zooms during the exposure.

public class RadialBlurEffect : ShaderEffect

Inherits from / implements: ShaderEffect

Remarks

Twelve samples are taken per pixel, which is enough to read as a streak without banding at the strengths this effect is meant for. Animate BlurAmount from zero for a zoom-in; move CenterXY to throw the streak off-axis.

Members at a glance

RadialBlurEffectInitializes a new instance of the RadialBlurEffect class.
BlurAmountHow far each pixel is smeared towards CenterXY, as a fraction of its distance from it. Zero leaves the input untouched; a useful range is about 0.05 to 0.5.
CenterXYThe point the streak converges on, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right.
InputThe image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush.
BlurAmountPropertyIdentifies the BlurAmount dependency property.
CenterXYPropertyIdentifies the CenterXY dependency property.
InputPropertyIdentifies the Input dependency property.

Constructors

RadialBlurEffect

public RadialBlurEffect()

Initializes a new instance of the RadialBlurEffect class.

Properties

BlurAmount

public double BlurAmount

How far each pixel is smeared towards CenterXY, as a fraction of its distance from it. Zero leaves the input untouched; a useful range is about 0.05 to 0.5.

CenterXY

public Point CenterXY

The point the streak converges on, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right.

Input

public Brush Input

The image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush.

Fields

BlurAmountProperty

public static readonly DependencyProperty BlurAmountProperty

Identifies the BlurAmount dependency property.

CenterXYProperty

public static readonly DependencyProperty CenterXYProperty

Identifies the CenterXY dependency property.

InputProperty

public static readonly DependencyProperty InputProperty

Identifies the Input dependency property.