@thi.ng/shader-ast-stdlib
Version:
Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast
11 lines (10 loc) • 308 B
JavaScript
import { $w, $x, $y, $z } from "@thi.ng/shader-ast/ast/swizzle";
import { min } from "@thi.ng/shader-ast/builtin/math";
const minComp2 = (v) => min($x(v), $y(v));
const minComp3 = (v) => min(minComp2(v), $z(v));
const minComp4 = (v) => min(minComp3(v), $w(v));
export {
minComp2,
minComp3,
minComp4
};