pow
The first value raised to the power of the second.
pow(x: Val, y: Val): Expr
Import math from shaders/std and use math.pow.
Shapes a 0..1 value: powers above 1 push it toward 0, powers below 1 toward 1. Keep the base non-negative.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val | |
y | Val |
Example
const hardened = pow(coverage, params.uniforms.hardness)
See also
Used by
Aurora, CarbonFiber, Crystal, FlowingGradient, Frost, Goo, Heatmap, Hologram, Holographic, Irradiance, Nebula, Plastic, ReactionDiffusion, Voxels, Water