# PointerSpotlightShaderEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/library/struct-pointerspotlightshadereffect/

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

```rust
struct PointerSpotlightShaderEffect
```

A light under the pointer, screened over the content (Effector's
`PointerSpotlightShaderEffect`): around (`pointer-x`, `pointer-y`) (the
normalized pointer, clamped to 0..1), fading with the square of the
distance to nothing at `radius` (a fraction of the area, clamped to
0.05..0.65), at the opacity `strength` while the pointer is over the host
or pressed, plus `press-boost` while pressed (each clamped to 0..1, the sum
to 1), times the colour.

`pointer-spotlight(pointer-x=0.5, pointer-y=0.5, is-pointer-over=true,
radius=0.24, strength=0.28, color=#FFD26B)`. An overlay shader effect with
the blend mode `Screen`, masked by the content (no light over transparent
content); without the pointer over the host (the default), or with no
strength and no boost (the neutral value), the content is unchanged.
[`InteractivePointerSpotlightEffect`](/docs/0.5.0/api/ferroui-base/media/effects/library/struct-interactivepointerspotlighteffect/) follows the pointer.

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

## Members

- [`pointer_x`](#struct_field-pointer_x)
- [`pointer_y`](#struct_field-pointer_y)
- [`is_pointer_over`](#struct_field-is_pointer_over)
- [`is_pressed`](#struct_field-is_pressed)
- [`radius`](#struct_field-radius)
- [`strength`](#struct_field-strength)
- [`press_boost`](#struct_field-press_boost)
- [`color`](#struct_field-color)

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

### pointer_x

```rust
pointer_x: f64
```

The horizontal position of the pointer, 0 (left) to 1 (right)
(default 0.5).

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

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

### pointer_y

```rust
pointer_y: f64
```

The vertical position of the pointer, 0 (top) to 1 (bottom) (default
0.5).

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

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

### is_pointer_over

```rust
is_pointer_over: bool
```

Whether the pointer is over the host (default `false`).

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

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

### is_pressed

```rust
is_pressed: bool
```

Whether the pointer is pressed (default `false`).

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

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

### radius

```rust
radius: f64
```

Where the light ends, a fraction of the area (default 0.24).

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

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

### strength

```rust
strength: f64
```

The opacity of the light at its centre while the pointer is over the
host, 0 to 1 (default 0.28).

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

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

### press_boost

```rust
press_boost: f64
```

The opacity added while pressed, 0 to 1 (default 0.42).

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

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

### color

```rust
color: crate::media::Color
```

The colour of the light (default #FFD26B).

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

## 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`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- [`CustomEffect`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffect/)

## Availability

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