This pattern offers similar functionality to PxrBlend, combining with up to 8 layers, instead of only using a top and bottom layer. There is also an additional background (or base) layer.
Each layer exposes the following parameters, with [x] being a number between 0 and 7. Layers are ordered such that layer 7 is at the bottom and layer 0 is the topmost layer.
This enables the layer [x] for usage.
The blend mode used to blend the current layer with the previous one. The behavior of the this parameter is identical to PxrBlend's operation.
The RGB input for the image layer [x].
The alpha channel of the image layer [x]. When the alpha is < 1, a black background is used under this image layer.
The RGB input for the bottom or base image.
The alpha channel or mask of the bottom or base image.
The resulting color of all layers is clamped to 1.0
The clamped color result.
The R channel from the resultRGB output.
The G channel from the resultRGB output.
The B channel from the resultRGB output.