@thi.ng/shader-ast-stdlib
Version:
Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast
31 lines • 913 B
TypeScript
/**
* Returns signed distance from `p` to 2D cross/plus of given `size` and corner
* radius `r`.
*
* @remarks
*
* - `size` consist of overall width/size (in x) and thickness (in y component)
* - corner radius can also be negative
*
* Ported from original GLSL impl by Inigo Quilez:
* https://iquilezles.org/articles/distfunctions2d/
*
* @param p -
* @param size -
* @param r -
*/
export declare const sdfCross2: import("@thi.ng/shader-ast").TaggedFn3<"vec2", "vec2", "float", "float">;
/**
* Returns signed distance from `p` to 2D "X-sign" of given `size` and stroke
* weight `r`.
*
* @remarks
* Ported from original GLSL impl by Inigo Quilez:
* https://iquilezles.org/articles/distfunctions2d/
*
* @param p -
* @param size -
* @param r -
*/
export declare const sdfRoundedX2: import("@thi.ng/shader-ast").TaggedFn3<"vec2", "float", "float", "float">;
//# sourceMappingURL=cross.d.ts.map