Skip to content

fadeEdge

fadeEdge(inputColor, inputUV, edgeWidth): Node<"vec4">

Defined in: packages/nodes/src/alpha/fadeEdge.ts:21

Fade alpha towards the edges of UV space using smoothstep.

Parameters

inputColor

Node<"vec4">

The input color (vec4 with alpha)

inputUV

Node<"vec2">

The UV coordinates

edgeWidth

FloatInput = 0.1

Width of the fade region (0-0.5, default: 0.1)

Returns

Node<"vec4">

Color with edge-faded alpha

Examples

// Fade edges with default width
fadeEdge(texture(tex, uv()), uv())
// Wide fade edge
fadeEdge(texture(tex, uv()), uv(), 0.3)