splat3
One number copied into all three channels of a vec3.
splat3(x: Val): Expr
Import math from shaders/std and use math.splat3.
The usual way to blend two colors by a single amount with mix.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val |
Example
const rgb = mix(darkRgb, lightRgb, splat3(brightness))
See also
mix— A blend fromatobbyt, where 0 givesaand 1 givesb.vec3— A 3D vector from three values, often a color without alpha.
Used by
Aurora, CarbonFiber, Chrome, Crystal, FlowingGradient, Frost, Hologram, Holographic, Irradiance, Nebula, Obsidian, Plastic, Prism, ReactionDiffusion, Sparkle, StudioBackground, Water