Skip to main content

UI Toolkit Filters

Add impact to your UI with UIFX filters for UI Toolkit!

Unity 6.3 added support for more complex shader logic so we began converting some of our Unity UI filter effects to UI Toolkit.

Filters

Long Shadow Filter

Screenshot

The Long Shadow Filter is very useful to create a high contrast 3D effect.

Property                            TypeDescription
AngleFloatThe angle that shadow is cast in degrees. Default value is 135, range is [0..360].
DistanceFloatThe distance in pixels that the shadow is cast.
Color FrontColorThe front color of the shadow.
Color BackColorThe back color of the shadow.

Drop Shadow Filter

Screenshot

The Drop Shadow Filter draws a shadow outside the graphic. Note that this filter can be very expensive when using large blur sizes.

Property                            TypeDescription
AngleFloatThe angle that shadow is cast in degrees. Default value is 135, range is [0..360].
RadiusFloatThe distance in pixels that the shadow is cast.
BlurFloatThe amount of blur to apply.
ColorColorThe color of the shadow.

Inner Shadow Filter

Screenshot

The Inner Shadow Filter draws a shadow inside the graphic giving a recessed appearance.

Property                            TypeDescription
AngleFloatThe angle that shadow is cast in degrees. Default value is 135, range is [0..360].
DistanceFloatThe distance in pixels that the shadow is cast.
BlurFloatThe amount of blur to apply.
ColorColorThe color of the shadow.

Inner Glow Filter

Screenshot

The Drop Glow Filter draws a glow inside the graphic.

Property                            TypeDescription
BlurFloatThe amount of blur to apply.
PowerFloatControls the falloff of the blur.
ColorColorThe color of the shadow.

Usage

To start using these filters with UI Tookit you must first enable support in Preferences:

  1. Go to the Edit > Preferences window and open the UIFX options, enabled UI Toolkit Filters Support and press the Apply Changes button.

    screenshot
  2. Wait for the scripts to reload
  3. Close the Preferences window

Performance

PERFORMANCE

Due to limitations in UI Toolkit's filter implementation we're not able to apply the same high level of optimisations as we have for UGUI. So be careful with applying these filters to large areas of the UI, or setting large blur values.