Circles
Search…
Metal
There are a couple different Metal nodes. In the main Metal nodes you can code full RGBA, and in the Metal Script nodes you can code individual red, green, blue and alpha channels.
There are three type of effect Metal nodes, 1FX, 2FX and NFX. The numbers represent the number of inputs. The NFX nodes can take in multiple inputs.
The input resolutions in NFX needs to be the same.

Examples

To create gradients you can use the u and v variables like this:
return float4(u, v, 0.0, 1.0);
If you create a Metal (1FX) node you can return the input like this:
return pix;
If you create a Metal (2FX) node you can use the inputs like this:
return pow(pixA, 1.0 / pixB);
If you create a Metal (NFX) node you can get the inputs like this:
float4 pixA = texs.sample(s, uv, 0);
float4 pixB = texs.sample(s, uv, 1);
float4 pixC = texs.sample(s, uv, 2);
return pixA + pixB + pixC;

Variables

Metal

pi, u, v, uv, var.width, var.height, var.aspect, var.uniform

Metal (1FX)

pi, u, v, uv, w, h, wu, hv, tex, pix, var.width, var.height, var.aspect, var.uniform

Metal (2FX)

pi, u, v, uv, wA, hA, wuA, hvA, wB, hB, wuB, hvB, texA, texB, pixA, pixB, var.width, var.height, var.aspect, var.uniform

Metal (NFX)

pi, u, v, uv, pixCount, texs, var.width, var.height, var.aspect, var.uniform