Shaders are written in Metal
fragment float4 shader() {
return float4(u, v, 0.0, 1.0);
}

This returns a gradient Graphic, based on predefined u (x) and v (y) variables.
<aside> <img src="/icons/light-bulb_gray.svg" alt="/icons/light-bulb_gray.svg" width="40px" />
The return value of type float4 is representing RGBA of the pixel at u and v.
</aside>
u is a float that goes horizontally in the X axis from 0.0 to 1.0, left to right.v is a float that goes vertically in the Y axis from 0.0 to 1.0, top to bottom.uv is a float2, a combination of u and v.resolution is a float2 with the resolution of the output Graphic.sampler can be used to sample pixels in a input Graphic.M_PI_F PI (Defined by Metal).<aside> <img src="/icons/light-bulb_gray.svg" alt="/icons/light-bulb_gray.svg" width="40px" />
To access the float2 components append .x or .y, and for a color’s float4 components .r, .g, .b, .a.
</aside>
In the Shader node, custom variable and textures can be added via inlets.
In properties, use External Inlets to add the variables, along with names.
Once a variable is created, a new inlet will be added to the node.