Material Functions

Alpha Multiply

This takes in the colour and applies the alpha to it before appending it to the 4th colour channel. This can be used with the Premultiplied Alpha Composite Material Expression for the blend input.

If Equal One

Returns B if Value is equal to 1, otherwise returns A.

Outline Colour Parameters

A collection of material parameters, this makes it easier to set up the various colouring that might be needed for an outline effect.

Outline Mask

A helper function to create a mask for the outline. Distance field is self explanatory. Max Outline Size is the largest you want your outline to be, this is ignored however if Use Max Outline Size is false. Constant sizing changes whether or not the max size is based on pixels or % of the screen.

Remap Distance

This remaps the distance field so that the values don't go from 1 (far outside) to 0 (edge) to 1 (far inside) but instead go 1 (far outside) to 0.5 (edge) to 0 (far inside). The inside mask would be the stencil mask and inverting swaps the direction so it becomes 0 (far outside) to 1 (far inside)

Last updated