HexPixellateEffect
A pixel shader effect that quantises its input to a hexagonal grid rather than the square one PixellatingEffect uses.
public class HexPixellateEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
Each pixel takes the colour of the nearest hexagon centre. Animating HexSize from something small resolves the picture out of the mosaic, which demonstrates the effect better than any single size does.
Members at a glance
HexPixellateEffect | Initializes a new instance of the HexPixellateEffect class. |
HexSize | The width of one hexagon in texture coordinates, so 0.04 gives about twenty-five hexagons across the element. Values below 0.002 are treated as 0.002. |
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. |
HexSizeProperty | Identifies the HexSize dependency property. |
InputProperty | Identifies the Input dependency property. |
Constructors
HexPixellateEffect
Initializes a new instance of the HexPixellateEffect class.
Properties
HexSize
The width of one hexagon in texture coordinates, so 0.04 gives about twenty-five hexagons across the element. Values below 0.002 are treated as 0.002.
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
HexSizeProperty
Identifies the HexSize dependency property.
InputProperty
Identifies the Input dependency property.