Texture Layer - anticto/Mutable-Documentation GitHub Wiki

Combine multiple Textures into a single Texture, layer by layer using the specified blend effects and masks.

Blend effects

The available effects are listed below. Formulas are applied per color channel, with B = base channel value and L = layer channel value, both normalized to the 0–1 range and R = results clamped to 0–1:

  • None: no effect; the base is kept unchanged. R = B.
  • Blend: the layer replaces the base (a straight overwrite). R = L.
  • Multiply: multiplies base and layer, so the result is always darker — a white layer leaves the base unchanged, a black layer turns it black. R = B * L.
  • Screen: the inverse of Multiply, always lighter — a black layer leaves the base unchanged, a white layer turns it white. R = 1 − (1 − B) * (1 − L).
  • Overlay: combines Multiply and Screen driven by the base — darkens the dark areas and lightens the light ones, boosting contrast. R = 2 * B * L when B ≤ 0.5, otherwise R = 1 − 2 * (1 − B) * (1 − L).
  • Soft Light: a gentle, low-contrast version of Overlay; the layer softly lightens or darkens the base. R = (1 − B) * B * L + B * (1 − (1 − B) * (1 − L)).
  • Hard Light: like Overlay but driven by the layer — a dark layer multiplies, a light layer screens, giving strong contrast. R = 2 * B * L when L ≤ 0.5, otherwise R = 1 − (1 − B) * (2 − 2 * L).
  • Burn: darkens the base according to the layer, with more contrast than Multiply. R = 1 − (1 − B) / L.
  • Dodge: brightens the base according to the layer, with more contrast than Screen. R = B / (1 − L).
  • Lighten: brightens the base by a proportion of what is missing to reach white (identical to Screen). R = B + L * (1 − B).
  • Normal Combine: blends two normal maps — the base and layer RGB are treated as normal vectors and the base normal is reoriented by the layer (as in Unreal's BlendAngleCorrectedNormals). Not a per-channel formula.

When a Mask is connected, the effect is applied through it per pixel: R = (1 − Mask) * B + Mask * Effect(B, L), so the mask fades between the original base (black) and the full effect (white).

[!WARNING] If the blend mode is Blend and no mask is provided, the layer completely overrides the base Texture and any layer with a lower index.

[!NOTE] To apply an effect to a single channel, use the Texture Break and Texture From Channels nodes as seen in the following example: