KaleidoscopeEffect
A pixel shader effect that folds its input into mirrored wedges around a centre point, the way a kaleidoscope folds whatever it is pointed at.
public class KaleidoscopeEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
Animate Rotation to turn the barrel; the picture keeps its symmetry while the content sweeps through it. SegmentCount is settable at any time but is meant to be chosen rather than animated - changing it mid-animation re-cuts the wedges and reads as a jump.
Members at a glance
KaleidoscopeEffect | Initializes a new instance of the KaleidoscopeEffect class. |
CenterXY | The point the wedges radiate from, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right. |
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. |
Rotation | How far the fold is turned, in radians. Animate this to rotate the pattern. |
SegmentCount | How many mirrored wedges the picture is folded into. Values below one are treated as one, which leaves the input unfolded. |
CenterXYProperty | Identifies the CenterXY dependency property. |
InputProperty | Identifies the Input dependency property. |
RotationProperty | Identifies the Rotation dependency property. |
SegmentCountProperty | Identifies the SegmentCount dependency property. |
Constructors
KaleidoscopeEffect
Initializes a new instance of the KaleidoscopeEffect class.
Properties
CenterXY
The point the wedges radiate from, in texture coordinates, where (0,0) is the top left of the element and (1,1) the bottom right.
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.
Rotation
How far the fold is turned, in radians. Animate this to rotate the pattern.
SegmentCount
How many mirrored wedges the picture is folded into. Values below one are treated as one, which leaves the input unfolded.
Fields
CenterXYProperty
Identifies the CenterXY dependency property.
InputProperty
Identifies the Input dependency property.
RotationProperty
Identifies the Rotation dependency property.
SegmentCountProperty
Identifies the SegmentCount dependency property.