Function CreateTextureWithFactorOperand
-
CreateTextureWithFactorOperand(
texture: Nullable<BaseTexture>,
factor: Color4,
channel?: TextureChannel,
colorSpace?: TextureColorSpace,
): ITextureProcessOperandParameters
- texture: Nullable<BaseTexture>
The texture to sample, or null to use the factor alone
- factor: Color4
The constant factor to multiply by
Optionalchannel: TextureChannelOptional channel selection. When set, the sampled value is swizzled before factor multiplication (e.g.
TextureChannel.G→ GGGA, then multiplied by factor). Defaults toTextureChannel.RGBA(no swizzle).OptionalcolorSpace: TextureColorSpaceOptional color space. When
TextureColorSpace.SRGB, the sampled RGB channels are linearized before factor multiplication. Defaults toTextureColorSpace.Linear.
Returns ITextureProcessOperand
An operand that evaluates to
sample(texture) * factor, orfactorif texture is null - texture: Nullable<BaseTexture>
Create an operand from a texture multiplied by a constant RGBA factor. This is the standard glTF pattern (e.g. baseColorTexture * baseColorFactor). If
textureis null, returns a factor-only operand.