API

Function SingleScatterToMultiScatterAlbedoAsync

  • Convert a single-scatter albedo operand to multi-scatter albedo using the OpenPBR/KHR approximation. This is the inverse of MultiScatterToSingleScatterAlbedoAsync. RGB is clamped to [0, 1] before conversion and alpha is preserved.

    If the operand is constant, the conversion is performed on the CPU. Otherwise it is baked into a linear procedural texture. Input color-space conversion, channel selection, factors, UV transforms, metadata propagation, and intermediate disposal follow the other unary texture processor operations.

    Parameters

    • name: string

      Name for the resulting procedural texture (used only when a GPU pass is needed)

    • input: ITextureProcessOperand

      Single-scatter albedo operand to convert

    • scene: Scene

      Scene to create the texture in (used only when a GPU pass is needed)

    • aniso: number = 0

      Scattering anisotropy in [-1, 1]. 0 (default) is isotropic; positive values are forward-scattering. This inverts the anisotropic multi→single mapping: s^2 = (1 - rho_ss) / (1 - aniso * rho_ss), then rho_ms = (1 - s)(1 - 0.139 s)/(1 + 1.17 s). Clamped to [-0.9999, 0.9999], as in the renderer.

    • OptionaloutputOptions: ITextureProcessorOutputOptions

      Optional render-target type, sampling, and mipmap settings.

    Returns Promise<ITextureProcessOperand>

    An operand containing the converted multi-scatter albedo