UNPKG

@thi.ng/shader-ast-stdlib

Version:

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

18 lines 731 B
import type { Prim, Term } from "@thi.ng/shader-ast"; /** * Inline function. Converts sRGB color term (1D-4D) to linear space via * `pow(rgb, GAMMA)`, where gamma is hardcoded to 2.2. For vec4 args, * the `w` component (alpha) remains unchanged. * * @param x - */ export declare const toLinear: <T extends Prim>(x: Term<T>) => import("@thi.ng/shader-ast").FnCall<T>; /** * Inline function. Converts linear color term (1D-4D) to sRGB via * `pow(rgb, 1.0 / GAMMA)`, where gamma is hardcoded to 2.2. For vec4 * args, the `w` component (alpha) remains unchanged. * * @param x - */ export declare const toSRGB: <T extends Prim>(x: Term<T>) => import("@thi.ng/shader-ast").FnCall<T>; //# sourceMappingURL=linear-srgb.d.ts.map