Skip to main content

Extrude Filter Component

Component Screenshot

Overview

This component adds a extrusion effect to the UI object it is applied to.

WebGL Demo

Properties

Component Screenshot

Property                            Type    Range    DefaultDescription
Extrude
    ProjectionEnumPerspectiveWhich projection method to use. Options are:
Perspective - Gives a perspective illusion of 3D depth by extruding towards a focal point.
Orthographic - The extrusion is based only on an angle and direction. This option is less computationally expensive than Perspective.
    AngleFloat[0..360]135.0The angle of extrusion in degrees. In Perspective projection mode this indicates the angle to the focal point from the center of the source Graphic.
    Perspective DistanceFloat[0..512]0.0In Perspective projection mode this indicates the distance along the angle to the focal point from the center of the source Graphic.
    DistanceFloat[0..512]32.0The length in pixels of the extruson. In Perspective projection mode it doesn't correspond directly to pixels but is still approxiamtely proportional.
Fill
    ModeEnumBi ColorThe method to use to fill the extruion with color. Options are:
Color - Fill with a single color.
Bi Color - Fill with a color interpolated between two colors based on the distance along the extrusion.
Gradient - Fill with a Gradient based on the distance along the extrusion.
Texture - Fill with a 2D horizontal gradient texture based on the distance long the extrusion.
    ColorColorGreyThe main color to fill with.
    Back ColorColorClearThe second color to fill with in Bi Color mode.
    Scroll SpeedFloat[-inf..inf]0.0The speed at which to animate the fill mode.
    ReverseBoolFalseIn Bi Color, Gradient and Texture fill modes, this creates reverses the gradient.
    Blend ModeEnumMultiplyThe color blending mode to use for blending the fill mode with the source Graphic colors. Options are:
.• Replace - Ignore the source Graphic color and just use the fill color.
Multiply Multiply the source Graphic color by the fill color.
Apply
    Source AlphaFloat[0..1]1.0Fades the source Graphic.
    Composite ModeEnumNormalWhich mode to use when compositing the extrusion. Options are:
Normal - Extrusion is composited behind the source graphic.
Cutout - Extrusion is rendered with the source graphic cut out from it.
Shadow - Only the extrusion is rendered.
    StrengthFloat[0..1]1.0Strength of the effect.

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 extrusion effect.

Usage with TextMeshPro

To use this filter effect with TextMeshPro use the Filter Stack (TextMeshPro) component.