About UIFX - Long Shadow Filter
Overview
What?
UIFX-LongShadowFilter
is a new visual effect for Unity's UI (uGUI) components that applies a long shadow filter of the component.
Why?
Unity's UI system currently doesn't have an option to render UI elements with visual striking effects such as long shadows.
How?
Just add the UIFX-LongShadowFilter
component to your UI component. That's it!
Features
- High quality shadow rendering
- TextMeshPro supported
- Easy to use
- Highly optimised
- Cross-platform
- Built-in/URP/HDRP
- Source code included
- Well documented & supported
- Also works in editor (no need to enter play mode)
Usage
Some example use cases:
- 3D
- Dual Color
- Cutout Pivot
- Style Example
- Style Example #2
Compatibility
Unity Version | 6.x | 2023.x | 2022.x | 2021.x | 2020.x | 2019.x | 2018.x | 2017.x |
---|---|---|---|---|---|---|---|---|
Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
Platform | Windows/UWP | macOS | Linux | Android | iOS / tvOS | WebGL | PS4 / PS5 | XBox One |
---|---|---|---|---|---|---|---|---|
Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Render Pipeline | Built-in | URP | HDRP |
---|---|---|---|
Supported | ✓ | ✓ | ✓ |
Dependencies
This plugin requires the Unity.UI
package that is included with Unity by default.
Supported Features
UI Feature | Supported | Notes |
---|---|---|
Components: | ||
Text | ✓ | |
TextMeshPro | ✓ | |
Image | ✓ | |
RawImage | ✓ | |
Mask | ✓ | |
Rect Mask 2D | ✓ | |
CanvasGroup | ✓ | |
Custom | ✓ | |
Canvas Render Modes: | ||
Screen-Space Overlay | ✓ | |
Screen-Space Camera | ✓ | |
World Space | X | |
Render Pipelines: | ||
Built-in | ✓ | |
URP | ✓ | |
HDRP | ✓ | |
Colorspaces: | ||
Gamma | ✓ | |
Linear | ✓ |
Advanced
Performance
UIFX-LongShadowFilter
has had several optimisation passes, so we can say with confidence that it is highly performant. Once the shadow has been computed it simply rendered as a texture so the effect is very fast. Changing properties of the component, the Graphic
or the parent hierarchy will result in the shadow being recalcuated which can be expensive when the Distance
property is too high.
Garbage Collection
This component has been optimised to reduce garbage generation.