three-virtual-geometry
Version:
Virtual geometry for three.js WebGPU: automatic cluster LOD and GPU-driven culling for billions of triangles. Independent implementation, not affiliated with Epic Games.
23 lines (22 loc) • 1.49 kB
TypeScript
type Node = any;
/** Steps of a cluster's blend range: it draws the pixels whose step s is in [lo, hi) of 0..LOD_FADE_STEPS - 1. */
export declare const LOD_FADE_STEPS = 255;
/** Packed blend range of a cluster drawn over every pixel (lo = 0, hi = LOD_FADE_STEPS), shifted as in the draw list. */
export declare const FULL_FADE_BITS: number;
/** (lo, hi) blend range of the current cluster, written by the vertex stage. */
export declare const vgFadeVarying: import("three/webgpu").PropertyNode<"vec2">;
/** Frame number for an animated pattern (0: fixed). Set by VirtualGeometry from `lodBlendTemporal`. */
export declare const lodBlendFrame: import("three/webgpu").UniformNode<"float", number>;
/**
* True when the current fragment belongs to its pixel's cut. The per-pixel value is interleaved gradient noise
* (Jimenez 2014): evenly spread over a few pixels, so a half-blended surface looks like a fine, even stipple,
* and suited to temporal anti-aliasing when it moves every frame.
*/
export declare function lodBlendMask(): Node;
/**
* Blend range of a cluster (CPU reference of the GPU selection): its projected own and parent errors in pixels,
* the error threshold and the band factor. Null when the cluster is in no cut of the band [threshold,
* threshold * blend] (or its range rounds to nothing). With blend 1 this is the plain cut.
*/
export declare function lodFadeRange(own: number, parent: number, threshold: number, blend: number): [number, number] | null;
export {};