UNPKG

@thi.ng/shader-ast-stdlib

Version:

Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast

11 lines (10 loc) 186 B
import { TAU, add, cos, mul } from "@thi.ng/shader-ast"; const cosineGradient = (a, b, c, d, t) => add(a, mul(b, cos(mul(TAU, add(mul(c, t), d))))); export { cosineGradient };