Inner Glow Filter (beta) Component
Overview
This component adds a visual inner glow effect to the UI object it is applied to, similar to the Photoshop effect.
Properties

| Property | Type | Details |
|---|---|---|
| Glow | ||
| Size | Float | The distance the glow travels from the edge of the Graphic. |
| Choke | Float | Starting from the edge, make more of the glow stronger. |
| Contour | Curve | Provides additional falloff for the glow and can be used to shape it. |
| Down Sample | Enum | How to downsample the texture before blurring. Downsampling gives improved performance, however the quality can be lower especially when animation the blur amount, but for still images it's usually not noticeable. Options are: • Auto - Automatic downsampling will depend on the platform. Typically mobile platforms will get a half downsample. (DEFAULT)• None - No downsampling.• Half - Downsample to half the size.• Quarter - Downsample to a quarter the size.• Eighth - Downsample to an eighth the size. |
| Fill | ||
| Mode | Enum | The fill mode to apply colors to the glow. Options are: • Color - A solid color (DEFAULT).• Gradient - A gradient from left-right corresponding to edge-inner.• Gradient Texture - A texture where the gradient goes left-right. |
| Color | Color | The color of the glow when FillMode is set to Color. |
| Gradient | Gradient | The color of the glow when FillMode is set to Gradient. |
| Gradient Texture | Texture2D | The color of the glow when FillMode is set to GradientTexture. |
| Noise | Float | Add noise to the glow. Best performance is set to zero. |
| Opacity | Float | Adjust opacity of the glow. |
| Apply | ||
| Render Space | Enum | Which coordinate system use when rendering this filter. Options are: • Canvas: Render the filter before any transforms (scale/rotation/translation etc) are applied.• Screen: Render the filter after transforms have been applied.Read more about this property here. |
| Strength | Float | Strength of the effect. Default value is 1.0, range is [0..1] |
Usage
Add this component to any GameObject that contains a UI Graphic component (eg Text, Image, RawImage, etc). The object will now render with an inner glow.
Usage with TextMeshPro
To use this filter effect with TextMeshPro - Text (UI) use the Filter Stack (TextMeshPro) component.
Scripting
Namespace
The namespace
using ChocDino.UIFX;
Adding the InnerGlowFilter Component
Add the InnerGlowFilter component to your GameObject
// Add the component to your GameObject and set default properties
var glow = AddComponent<InnerGlowFilter>();
glow.BeginPropertyChange();
glow.Size = 24f;
glow.Choke = 0f;
glow.ContourCurve = new AnimationCurve(new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f));
glow.Downsample = Downsample.Auto;
glow.FillMode = InnerGlowFillMode.Gradient;
glow.Color = Color.white;
glow.Gradient = null;
glow.GradientTexture = null;
glow.Noise = 0f;
glow.Opacity = 1f;
glow.RenderSpace = FilterRenderSpace.Canvas;
glow.Strength = 1f;
glow.EndPropertyChange();