API

Function DivideTexturesAsync

  • Component-wise safe division of two texture operands: result = a / max(b, 0.00001).

    Each operand can be a texture, a constant factor, or a texture scaled by a factor. Division by zero is guarded with a small epsilon so the result is always finite.

    If both operands are constant (no textures), the operation is performed on the CPU and the result is returned as a factor-only operand with no texture allocated.

    When operands are results of previous operations (i.e. they carry a dispose function), their intermediate textures are automatically released after the GPU pass completes.

    Parameters

    Returns Promise<ITextureProcessOperand>

    An operand whose texture holds the GPU result, or whose factor holds the CPU-folded constant