UNPKG

@playcanvas/splat-transform

Version:

Library and CLI tool for 3D Gaussian splat format conversion and transformation

26 lines (25 loc) 1.1 kB
/** * Format a JS number as a WGSL `f32` literal. Adds an explicit `.0` so * integer-valued constants like `3` aren't parsed as `AbstractInt` * keeps shaders readable when the constant flips to a fractional value. * * @param n - Numeric value to format. * @returns WGSL literal string with explicit `.0` for integer values. */ declare const wgslF32: (n: number) => string; /** * Shared render-time tunables declared as WGSL `const` so every shader can * reference them as plain identifiers. Bound to the JS-side values in * [render/config.ts](../../render/config.ts) — the single source of truth. * * The PlayCanvas WGSL preprocessor's `cdefines` mechanism only registers * symbols for `#ifdef` checks; it does not substitute bare identifiers * with their values. WGSL `const` declarations cover that gap and can * additionally be used inside `@workgroup_size(...)` and other const- * expression contexts. * * Included via `#include "constants"` (see `sharedCincludes` in * `gpu-splat-rasterizer.ts`). */ declare const constantsChunk: string; export { constantsChunk, wgslF32 };