mul
The product of two values.
mul(a: Val, b: Val): Expr
Import math from shaders/std and use math.mul.
Multiply a color by a 0..1 mask to fade it, or a coordinate by a prop to scale it.
Parameters
| Name | Type | Notes |
|---|---|---|
a | Val | |
b | Val |
Example
const rgb = mul(params.uniforms.color.member('rgb'), coverage)
See also
Used by
Arc, Aurora, Blob, BrushedMetal, CarbonFiber, Chrome, Circle, CompressionArtifacts, Crystal, FlowingGradient, Frost, Goo, Heatmap, Hologram, Holographic, InkFlow, Irradiance, LiquidMetal, Marble, MeshGradient, Nebula, Obsidian, PixelThrow, Plastic, Prism, ReactionDiffusion, SmokeFill, Sparkle, StudioBackground, Surface3D, TimeTrail, Voxels, Water, Waveform