# ShaderUniformValue

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

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

```rust
enum ShaderUniformValue
```

The value of a uniform of the convention.

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

## Members

- [`Float`](#variant-float)
- [`Float2`](#variant-float2)
- [`Float4`](#variant-float4)
- [`Int`](#variant-int)
- [`ty`](#function-ty)
- [`from_parameter`](#function-from_parameter)
- [`floats`](#function-floats)

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

### Float

```rust
Float(f32)
```

A `float`.

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

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

### Float2

```rust
Float2([f32; 2])
```

A `float2`.

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

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

### Float4

```rust
Float4([f32; 4])
```

A `float4`.

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

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

### Int

```rust
Int(i32)
```

An `int`.

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

<a id="function-ty"></a>

### ty

```rust
fn ty(self: &Self) -> ShaderUniformType
```

The type of the value.

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

<a id="function-from_parameter"></a>

### from_parameter

```rust
fn from_parameter(value: &EffectParameterValue) -> Option<Self>
```

The uniform of a parameter value by the convention; `None` for text,
which has none, and for an image, which is a child.

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

<a id="function-floats"></a>

### floats

```rust
fn floats(self: &Self) -> &[f32]
```

The scalars of a float value, in order; empty for an `int`.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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`
- `StructuralPartialEq`
- `PartialEq`

## Availability

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