/** * BatchedTextColorNode - TSL Node for BatchedText SDF color and opacity rendering. * * Similar to TextColorNode but adapted for BatchedText's per-member * color/fill parameters stored in storage buffers. * * @module BatchedTextColorNode */ import { Node } from 'three/webgpu'; import type { NodeBuilder } from 'three/webgpu'; import type { TSLNodeFactory, TSLTextureNode, TSLVec4Node } from '../types/tsl.js'; import type { BatchedTextNodeSource } from './BatchedTextNode.js'; export interface BatchedTextColorNodeSource extends BatchedTextNodeSource { sdfMap: TSLTextureNode | undefined; } export interface BatchedTextColorNodeFactory extends TSLNodeFactory<[ batchedText: BatchedTextColorNodeSource | null, baseDiffuse?: TSLVec4Node | null ], TSLVec4Node> { setParameterLength(length: number): this; } /** * BatchedTextColorNode handles SDF-based color and opacity for BatchedText rendering. * It computes fill color, outline color, and proper alpha based on * signed distance field values, using per-member parameters from storage buffers. * * @augments Node */ declare class BatchedTextColorNode extends Node<'vec4'> { static get type(): string; /** * Constructs a new BatchedTextColorNode. * * @param {BatchedText} batchedText - Reference to the BatchedText instance. */ batchedText: BatchedTextColorNodeSource | null; baseDiffuse: TSLVec4Node | null; constructor(batchedText: BatchedTextColorNodeSource | null, baseDiffuse?: TSLVec4Node | null); /** * Sets up the SDF color and opacity computation. * Modifies diffuseColor with the computed SDF-based color and alpha. * * @param {NodeBuilder} builder - The current node builder. */ setup(builder: NodeBuilder): TSLVec4Node; } export default BatchedTextColorNode; /** * TSL function for creating a BatchedTextColorNode. * * This node handles SDF-based rendering for BatchedText, computing fill and outline * colors and opacity based on signed distance fields. It reads per-member colors from * storage buffers and applies visibility masking for GPU culling. * * This node should be used in `material.setupDiffuseColor` to override the diffuse * color with SDF rendering. * * This implementation-level API is intentionally internal and has no public package import. */ export declare const batchedTextColor: BatchedTextColorNodeFactory;