Function MultiScatterToSingleScatterAlbedoAsync
-
MultiScatterToSingleScatterAlbedoAsync(
name: string,
input: ITextureProcessOperand,
scene: Scene,
aniso?: number,
scale?: ITextureProcessOperand,
): Promise<ITextureProcessOperand>Parameters
- name: string
Name for the resulting procedural texture (used only when a GPU pass is needed)
- input: ITextureProcessOperand
Multi-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. MatchesmultiScatterToSingleScatterAlbedo(rho_ms, aniso)in helperFunctions. Clamped to[-0.9999, 0.9999], as in the renderer. Optionalscale: ITextureProcessOperandOptional operand multiplied into
input(RGBA) before conversion, in the same pass. Use it instead of a separate MultiplyTexturesAsync so that the product (e.g. scatter strength times multi-scatter color) isn't quantized before the nonlinear conversion.
Returns Promise<ITextureProcessOperand>
An operand containing the converted single-scatter albedo
- name: string
Convert a multi-scatter albedo operand to single-scatter albedo using the OpenPBR/KHR approximation. 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.