# SceneLightingEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/effects/struct-scenelightingeffect/

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

```rust
struct SceneLightingEffect
```

The lighting of the lights that reach the visual that paints the brush
(WinUI `Microsoft.UI.Composition.Effects.SceneLightingEffect`): the sum,
for every point of the brush, of the ambient lights times `AmbientAmount`
and of the diffuse light of the other lights times `DiffuseAmount`,
opaque. Animatable: `AmbientAmount`, `DiffuseAmount`, `SpecularAmount`,
`SpecularShine`.

The lights are the composition lights that target the visual (or one of
its ancestors), and, for a XAML brush, the XAML lights that target the
brush in the subtree of the element that holds them.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L584)

## Members

- [`name`](#struct_field-name)
- [`ambient_amount`](#struct_field-ambient_amount)
- [`diffuse_amount`](#struct_field-diffuse_amount)
- [`specular_amount`](#struct_field-specular_amount)
- [`specular_shine`](#struct_field-specular_shine)
- [`normal_map_source`](#struct_field-normal_map_source)

<a id="struct_field-name"></a>

### name

```rust
name: String
```

The name of the effect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L586)

<a id="struct_field-ambient_amount"></a>

### ambient_amount

```rust
ambient_amount: f32
```

The weight of the ambient lights (default 1).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L588)

<a id="struct_field-diffuse_amount"></a>

### diffuse_amount

```rust
diffuse_amount: f32
```

The weight of the diffuse light (default 1).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L590)

<a id="struct_field-specular_amount"></a>

### specular_amount

```rust
specular_amount: f32
```

The weight of the specular light (default 0; stored, flat visuals
have no specular highlight here).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L593)

<a id="struct_field-specular_shine"></a>

### specular_shine

```rust
specular_shine: f32
```

The shininess of the specular light (default 16; stored).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L595)

<a id="struct_field-normal_map_source"></a>

### normal_map_source

```rust
normal_map_source: Option<GraphicsEffectSource>
```

The normal map (stored; the lit surface is flat).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/effects/graphics_effects.rs#L597)

## 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`
- `From<SceneLightingEffect>`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`

## Availability

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