ChromaticSplitEffect
A pixel shader effect that separates the red and blue channels of its input radially, leaving green in place - the colour fringing a cheap lens leaves at the corners of a photograph.
public class ChromaticSplitEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
The separation grows with the distance from CenterXY, so the middle of the picture stays sharp and the corners fringe. Animating Displacement over a small range reads as a focus pull; over a large one, as a glitch.
Members at a glance
ChromaticSplitEffect | Initializes a new instance of the ChromaticSplitEffect class. |
CenterXY | The point the separation radiates from, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right. |
Displacement | How far the red and blue channels are pushed apart at the edge of the element. Zero leaves the input untouched; a useful range is about 0.005 to 0.08. |
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. |
CenterXYProperty | Identifies the CenterXY dependency property. |
DisplacementProperty | Identifies the Displacement dependency property. |
InputProperty | Identifies the Input dependency property. |
Constructors
ChromaticSplitEffect
Initializes a new instance of the ChromaticSplitEffect class.
Properties
CenterXY
The point the separation radiates from, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right.
Displacement
How far the red and blue channels are pushed apart at the edge of the element. Zero leaves the input untouched; a useful range is about 0.005 to 0.08.
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
CenterXYProperty
Identifies the CenterXY dependency property.
DisplacementProperty
Identifies the Displacement dependency property.
InputProperty
Identifies the Input dependency property.