Material Expressions
Antialiasing Nodes
Antialias Input

Used as part of the antialiasing process. A material with these inputs will be rendered and then have the antialiasing performed on the result. Colour is just a 3 valued vector with alpha being a scalar.
For the alpha, it works intuitively where 1 is opaque and 0 is completely transparent
Antialiasing Output

The output result of the antialiasing pass. The result is always rendered to a render target and this node just makes accessing it easier.
Outline Nodes
Outline Output

This gets the selected outline output, either a simple outline or a distance field and splits the channels into their respective parts to make it easier to work with.
Also supports the ability to limit the distance field to just the inside or outside by setting those values to 1. The inside and outside is dictated by the stencil value.
It also include the option to include the 0 position value, this is a 2px boundary where the edge meets. When this is disabled, only the side specified will be outputted otherwise both 2px will be outputted regardless of what side is selected.
The outputs for the node are scalar values and each are a channel in the underlying render target. The way they are set are as follows:
(R) Distance Field is the actual 0 - 1 distance field or a bitmask if using simple outline mode
(G) Stencil is the corresponding stencil mask for the outline
(B) Process Mask is a mask that can be used to optimise rendering
(A) Occlusion is the mask for any scene depth that occludes the stencil's depth

Future updates may change the behaviour of the 0 position value as work gets done to improve the seed locations used for the distance field generation.
Outline Output Texture Object

Like the Outline Output node except that it just outputs the texture object. This then gets used by a Texture Sampler node.

Outline Output Parameter
This will be investigated for a later update, the goal is to provide a parameterised version to make creating materials easier.
Outline Output Texture Object Parameter
Same as the Outline Output Parameter but for the Outline Output Texture Object node.
Utility Nodes
Premultiplied Alpha Composite

Composites an alpha pre-multiplied blend value onto the base colour.
Split Outline

A helper node if you're using the Outline Output Texture Object node, it splits the channels and performs the same operations as the Outline Output.

Pixel Distance

A helper node to calculate how along the distance field to shader based on the input pixel value.
It has 2 modes, constant and relative.
Constant is a constant pixel value based on largest side of the screen, for 1080p resolutions, this will be the X axis. For portrait views like on a mobile device, this will be the Y axis.
Relative is a % of the screen. 10% will always be 10% of the screen regardless of the resolution.

Occlusion Output

Before the outlines are created, scene depth occlusion is checked and stored. The check itself is used to modify the outline result. This gets said output separately however it is also stored with the outline outputs themselves.
Last updated