vec4
A 4D vector, usually the final color with alpha.
vec4(...parts: Val[]): Expr
Import math from shaders/std and use math.vec4.
Takes four numbers, or a vec3 followed by alpha. Return one of these from paint:.
Parameters
| Name | Type | Notes |
|---|---|---|
...parts | Val[] | Optional. |
Example
return vec4(rgb, coverage)
See also
vec3— A 3D vector from three values, often a color without alpha.vec2— A 2D vector from two values.
Used by
Aurora, Blob, BrushedMetal, CarbonFiber, Chrome, Crystal, FlowingGradient, Frost, Goo, Heatmap, Hologram, Holographic, Irradiance, LiquidMetal, Nebula, Obsidian, Plastic, Prism, ReactionDiffusion, Sparkle, StudioBackground, Surface3D, TimeTrail, Voxels, Water, Waveform