Documentation / Node reference / tex nodes

tex/Shape

Creates a filled shape on a transparent texture.

Primitives

Draws a rectangle, an ellipse, a polygon or a star, to frame a picture or to use as a mask. center goes from 0 to 1 across the image, from its top left corner. size is measured against the shorter side, so shapes keep their proportions.

Parameters

Name Type What it does
type UInt8 RECTANGLE · ELLIPSE · POLYGON · STAR Shape to draw.
cornerRadius Float Corner roundness, from square (0) to fully round (1).
sides SInt32 Number of polygon sides.
points SInt32 Number of star points.
innerRadius Float Depth of the star's notches. Lower makes thinner points.
center Vector2 Shape centre, 0 to 1 from the top left.
size Vector2 Width and height. 1 matches the image's shorter side.
rotation Float Turn around the centre, in degrees, counter-clockwise.
feather Float Softens the edge by this many pixels.
fillColor Color4 Colour of the shape. Its alpha fades the whole shape.
resolution Vector2UInt Width and height in pixels.

Examples

Scenes you can open in the editor that teach this node.

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.