import type { Vector3 } from 'three/webgpu'; import type { TSLFloatNode, TSLFunction, TSLUintNode, TSLVec2Input, TSLVec2Node, TSLVec3Node } from '../types/tsl.js'; type GaussianFloatInput = number | TSLFloatNode | TSLUintNode; type GaussianVec3Input = Vector3 | TSLVec3Node; /** * UV coordinates in normalized -1 to 1 range (vec2). * At an axis-aligned quad edge: UV = ±1.0. * * @type {Node} */ export declare const gaussianUV: import("three/webgpu").PropertyNode<"vec2">; /** * Splat color from SH evaluation (vec4: rgba). * Contains pre-computed spherical harmonics color. * * @type {Node} */ export declare const gaussianColor: import("three/webgpu").PropertyNode<"vec4">; /** * NDC depth value in [0,1] range (float). * Pre-computed in vertex shader for perfect sync with scene depth. * 0 = near plane, 1 = far plane. * Unpacked from vPackedData.z. * * @type {Node} */ export declare const gaussianDepth: import("three/webgpu").Node<"float">; /** * View-space normal from 3D Gaussian ellipsoid (vec3). * Computed from the smallest scale axis (flattest direction). * Pre-flipped to face camera in the vertex shader. * * @type {Node} */ export declare const gaussianNormal: import("three/webgpu").PropertyNode<"vec3">; /** * Anti-aliasing compensation factor (float). * Compensates alpha for intensity reduction from low-pass filtering. * Unpacked from vPackedData.y. * * @type {Node} */ export declare const gaussianAAFactor: import("three/webgpu").Node<"float">; /** * Visibility flag (float: 0 or 1). * Set by compute shader based on culling. * Unpacked from vPackedData.x. * * @type {Node} */ export declare const gaussianVisible: import("three/webgpu").Node<"float">; /** * Squared Gaussian σ-extent of the quad's canonical (un-cropped) support (float). * kSq = 2·s² where s = min(sigmaCoverage, maxStdDev/√2), so kSq = 8 for the * default 2.83σ support. The falloff window is normalized against this extent, * which keeps the σ↔UV mapping correct for any sigmaCoverage/maxStdDev choice * (reference-goal invariant I1). Unpacked from vPackedData.w. * * @type {Node} */ export declare const gaussianKSq: import("three/webgpu").Node<"float">; /** * Full RGB Spherical Harmonics contribution (vec3). * View-dependent color delta from base DC color. * Used by material to apply shStrength: finalColor = baseColor + shColor * shStrength * * @type {Node} * @example * // Visualize SH contribution as RGB * material.emissiveNode = gaussianSHColor.mul(2.0).add(0.5); // Map to visible range * // Or use with custom strength * const adjusted = gaussianSHColor.mul(shStrengthUniform); */ export declare const gaussianSHColor: import("three/webgpu").PropertyNode<"vec3">; /** * World position of the splat center (vec3). * Computed from model matrix * local position in compute shader. * Used for shadow receiving - represents the actual 3D location of the Gaussian. * * @type {Node} */ export declare const gaussianWorldPosition: import("three/webgpu").PropertyNode<"vec3">; /** * Per-splat depth plane (vec4: gu, gv, centerViewDepth, unused). * gu/gv are the view-depth gradients over screen pixels (u right, v down) and * centerViewDepth is the positive linear view depth at the splat center, giving the * RaDe-GS planar depth d(fragment) = z + du·gu + dv·gv. Only populated when the * splat instance carries the third projected record (lit raster or compute-tiles). * * @type {Node} */ export declare const gaussianDepthPlane: import("three/webgpu").PropertyNode<"vec4">; /** * Screen-pixel offset of the fragment from the splat center (vec2, u right / v down). * Interpolates exactly because the billboard is emitted with w = 1 (affine in screen * space). Combine with gaussianDepthPlane for per-fragment planar view depth. * * @type {Node} */ export declare const gaussianScreenOffset: import("three/webgpu").PropertyNode<"vec2">; /** * Morton index normalized to [0,1] range (float). * With Morton ordering: spatially-adjacent splats have similar indices. * Use with mortonDebugColor() to visualize spatial locality. * * @type {Node} */ export declare const gaussianMortonIdx: import("three/webgpu").PropertyNode<"float">; /** * Splat index (uint as float for varying compatibility). * Used for tile-based culling to verify splat membership in tiles. * * @type {Node} */ export declare const gaussianSplatIdx: import("three/webgpu").PropertyNode<"float">; /** * Generate rainbow color from Morton index for debug visualization. * Maps normalized index [0,1] to HSV rainbow (hue 0-1, saturation 1, value 1). * * **Interpretation:** * - Smooth color gradients = good Morton ordering (spatially-adjacent splats have similar colors) * - Random color noise = poor/no ordering (cache thrashing likely) * * @param {Node} idx - Normalized Morton index [0,1] * @returns {Node.} RGB color */ export declare const mortonDebugColor: TSLFunction<[GaussianFloatInput], TSLVec3Node>; /** * Spherical Harmonics contribution magnitude (float). * Computed as length of gaussianSHColor. * Use this to visualize where and how strongly SH affects the rendering. * * @type {Node} * @example * // Visualize SH contribution as grayscale * material.emissiveNode = vec3(gaussianSH); */ export declare const gaussianSH: import("three/webgpu").Node<"float">; /** * Octahedral-encode a normalized direction into two floats in [-1, 1]. * Exact (up to float precision) round trip with octDecodeDirection; used to pack * per-splat surface-plane normals into spare projected-buffer channels. * * @param {Node} n - Normalized direction (vec3) * @returns {Node.} Octahedral coordinates */ export declare const octEncodeDirection: TSLFunction<[GaussianVec3Input], TSLVec2Node>; /** * Decode an octahedral-encoded direction back to a normalized vec3. * * @param {Node} f - Octahedral coordinates (vec2 in [-1, 1]) * @returns {Node.} Normalized direction */ export declare const octDecodeDirection: TSLFunction<[TSLVec2Input], TSLVec3Node>; /** * Compute Gaussian alpha falloff using UV coordinates. * Uses SuperSplat's normalized exponential formula for clean quad edges. * * Formula: (exp(-4*A) - EXP4) * INV_EXP4 * - At center (A=0): alpha = 1.0 * - At edge (A=1): alpha = 0.0 * * This normalization ensures zero alpha at quad boundaries, preventing * visible edges and ensuring smooth blending between overlapping splats. * * @param {Node} uv - UV coordinates in [-1, 1] range (vec2) * @returns {Node} Gaussian alpha (0 to 1) * @example * const alpha = gaussianAlphaUV(gaussianUV); */ export declare const gaussianAlphaUV: TSLFunction<[TSLVec2Input], TSLFloatNode>; /** * Extent-aware Gaussian falloff (reference-goal invariant I1). * * Evaluates the true Gaussian exp(-0.5·kSq·A) windowed so it reaches exactly 0 * at the canonical support edge (A = 1), where kSq is the squared σ-extent of * that support (kSq = 8 ⇒ identical to gaussianAlphaUV / SuperSplat's exp(-4A)). * * The vertex shader may CROP the quad (opacity-aware radius, adaptive sigma) by * scaling both the corner offsets and the UV by the same factor — the falloff * then evaluates the same curve over a smaller support instead of compressing * the Gaussian into the smaller quad (PlayCanvas clipCorner semantics). * * @param {Node} uv - UV in canonical support units (|uv| = 1 at the un-cropped edge) * @param {Node} kSq - Squared σ-extent of the canonical support (2·s², s = axis multiplier) * @returns {Node} Gaussian alpha (0 to 1) */ export declare const gaussianAlphaKUV: TSLFunction<[TSLVec2Input, GaussianFloatInput], TSLFloatNode>; /** * Compute final opacity combining Gaussian, base alpha, and AA factor. * * @param {Node} uv - UV coordinates * @param {Node} falloff - Gaussian falloff strength * @param {Node} baseAlpha - Base splat opacity * @param {Node} aaFactor - Anti-aliasing compensation * @returns {Node} Final clamped opacity (max 0.99) */ export declare const gaussianOpacity: TSLFunction<[TSLVec2Input, GaussianFloatInput, GaussianFloatInput, GaussianFloatInput], TSLFloatNode>; /** * Interleaved Gradient Noise for dithered transparency. * Uses IGN algorithm for high-quality stochastic patterns. * * @param {Node} fragCoord - Screen coordinates (vec2) * @returns {Node} Noise value (0 to 1) */ export declare const gaussianDitherNoise: TSLFunction<[TSLVec2Input], TSLFloatNode>; /** * Compute luminance from RGB color using standard coefficients. * * @param {Node} color - RGB color (vec3) * @returns {Node} Luminance value (0 to 1) */ export declare const gaussianLuminance: TSLFunction<[GaussianVec3Input], TSLFloatNode>; /** * Extract hue from RGB color and map to RGB wheel for visualization. * * @param {Node} color - RGB color (vec3) * @returns {Node} Hue as RGB color (vec3) */ export declare const gaussianHue: TSLFunction<[GaussianVec3Input], TSLVec3Node>; /** * Compute Gaussian power (exponent) and normalize to 0-1. * Returns 1 at center, 0 at edge (inverted for visualization). * * @param {Node} uv - UV coordinates * @returns {Node} Normalized power (1 at center, 0 at edge) */ export declare const gaussianPower: TSLFunction<[TSLVec2Input], TSLFloatNode>; /** * Apply exposure adjustment (brightness multiplier). * Works best on linear color values. * * @param {Node} color - RGB color (vec3) * @param {Node} exposure - Exposure multiplier (typically 0.1-3.0) * @returns {Node} Adjusted color (vec3) */ export declare const applyExposure: TSLFunction<[GaussianVec3Input, GaussianFloatInput], TSLVec3Node>; /** * Apply contrast adjustment around midpoint. * Expands or compresses tonal range around 0.5. * * @param {Node} color - RGB color (vec3) * @param {Node} contrast - Contrast multiplier (0.5 = flat, 1.0 = normal, 2.0 = high) * @returns {Node} Adjusted color (vec3) */ export declare const applyContrast: TSLFunction<[GaussianVec3Input, GaussianFloatInput], TSLVec3Node>; /** * Apply saturation adjustment using luminance. * Uses Rec.709 luminance coefficients. * * @param {Node} color - RGB color (vec3) * @param {Node} saturation - Saturation (0 = grayscale, 1 = normal, 2 = oversaturated) * @returns {Node} Adjusted color (vec3) */ export declare const applySaturation: TSLFunction<[GaussianVec3Input, GaussianFloatInput], TSLVec3Node>; /** * Apply vibrance (selective saturation). * Affects unsaturated colors more than already-saturated colors. * Useful for boosting muted tones without oversaturating vibrant areas. * * @param {Node} color - RGB color (vec3) * @param {Node} vibrance - Vibrance amount (-1 to 1, 0 = no change) * @returns {Node} Adjusted color (vec3) */ export declare const applyVibrance: TSLFunction<[GaussianVec3Input, GaussianFloatInput], TSLVec3Node>; /** * Apply highlight and shadow adjustment (lift/gain style). * Shadows affect dark values, highlights affect bright values. * Uses soft quadratic falloff for smooth transitions. * * @param {Node} color - RGB color (vec3) * @param {Node} highlights - Highlight adjustment (-1 to 1) * @param {Node} shadows - Shadow adjustment (-1 to 1) * @returns {Node} Adjusted color (vec3) */ export declare const applyHighlightsShadows: TSLFunction<[GaussianVec3Input, GaussianFloatInput, GaussianFloatInput], TSLVec3Node>; export {};