UNPKG

@thi.ng/shader-ast-stdlib

Version:

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

11 lines (10 loc) 308 B
import { $w, $x, $y, $z } from "@thi.ng/shader-ast/ast/swizzle"; import { max } from "@thi.ng/shader-ast/builtin/math"; const maxComp2 = (v) => max($x(v), $y(v)); const maxComp3 = (v) => max(maxComp2(v), $z(v)); const maxComp4 = (v) => max(maxComp3(v), $w(v)); export { maxComp2, maxComp3, maxComp4 };