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
| Name | Type | Default | Description |
|---|---|---|---|
| Enabled | boolean | true | Off, the node renders transparent. |
| FragmentShader | string | ||
| Kind | string | "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. |
| Operation | string | ||
| Data | string | Properties window only | |
| Position | string | Properties window only | Its own position in the graph of the NodeLayout it is a child of. |
| Status | read-only text | Properties window only |
Scripts
| OutputSize | string | scripts only | Its 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
| Name | Arguments | Returns | Description |
|---|---|---|---|
| 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. |
