# ShaderEffectMode

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/enum-shadereffectmode/

**enum** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
enum ShaderEffectMode
```

What the program of a shader effect computes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/custom_effect_shader.rs#L25)

## Members

- [`ContentSampling`](#variant-contentsampling)
- [`Overlay`](#variant-overlay)

<a id="variant-contentsampling"></a>

### ContentSampling

```rust
ContentSampling
```

The program samples the content (the child `content`) and its output
replaces the content over the area of the effect (a pixelation, a
distortion). Skia draws it as the runtime shader image filter of the
layer of the content, so the content stays a texture of the GPU.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/custom_effect_shader.rs#L31)

<a id="variant-overlay"></a>

### Overlay

```rust
Overlay
```

The program does not sample the content: its output is drawn over the
content with the blend mode of
the description (a procedural overlay: scan lines, a spotlight), inside
the layer of the content, so it blends with the content only; masked by
the alpha of the content when the description
is masked.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/custom_effect_shader.rs#L38)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
