GLNode

Write a fragment shader right on a node card, or pick a ready-made one: grade, blend, gradient, curves, resize, per-pixel maths, even a sound's waveform. Then wire the picture anywhere.

A GLNode is an image drawn by its Kind: Custom runs the GLSL you type on the card, the rest are built in. Each uniform becomes an input: a sampler2D is a square you wire a picture into, and numbers, vectors and colours are attributes (gl:SetAttribute("Strength", 0.5)). It redraws at most once a frame, and only when something it reads changes. A GLSL error is marked on its line and drawn as red stripes. It runs wherever it sits.

Properties

GL

NameTypeDefaultDescription
EnabledbooleantrueOff, the node renders transparent.
FragmentShaderstring
Kindstring"Custom"
Custom, Number Field Math, Color Field Math, Vector3 Field Math, Separate, Combine, Grade, Average, Sample, Min Max, Waveform, Spectrum, Color Curves, Bezier To Array, Luau Array, Resize, Solid Colour, Gradient, Blend
Which built-in kind draws the image; Custom draws with its code box.
Operationstring
DatastringProperties window only
PositionstringProperties window onlyIts own position in the graph of the NodeLayout it is a child of.
Statusread-only textProperties window only

Scripts

OutputSizestringscripts onlyIts picture's size: Largest uses the largest width and height of its square inputs, Input 1 the first one's size, Custom its own Size.

Methods

NameArgumentsReturnsDescription
GetImage(sampler: string)ImageContent?Reads back the image picked for a sampler2D, not what a wire brings in.
SetImage(sampler: string, image: ImageContent?)()Picks the image a sampler2D reads, like its picker in Properties; nil clears it, and a wire still wins.
From GlslSource 1
From BaseImageContent 9
From Instance 22