UNPKG

playcanvas

Version:

PlayCanvas WebGL game engine

47 lines (46 loc) 1.64 kB
/** * A render pass used to render multiple gsplats to a work buffer render target. * * @ignore */ export class GSplatWorkBufferRenderPass extends RenderPass { /** * Array of GSplatInfo objects to render in this pass. * * @type {GSplatInfo[]} */ splats: GSplatInfo[]; /** @type {number[][]|undefined} */ colorsByLod: number[][] | undefined; /** * The camera node used for rendering. * * @type {GraphNode} */ cameraNode: GraphNode; /** * Initialize the render pass with the specified render target. * * @param {RenderTarget} renderTarget - The target to render to. */ init(renderTarget: RenderTarget): void; /** * Update the render pass with splats to render and camera. * * @param {GSplatInfo[]} splats - Array of GSplatInfo objects to render. * @param {GraphNode} cameraNode - The camera node for rendering. * @param {number[][]|undefined} colorsByLod - Optional array of RGB colors per LOD index. * @returns {boolean} True if there are splats to render, false otherwise. */ update(splats: GSplatInfo[], cameraNode: GraphNode, colorsByLod: number[][] | undefined): boolean; /** * Render a single splat info object. * * @param {GSplatInfo} splatInfo - The splat info to render. */ renderSplat(splatInfo: GSplatInfo): void; } import { RenderPass } from '../../platform/graphics/render-pass.js'; import type { GSplatInfo } from './gsplat-info.js'; import type { GraphNode } from '../graph-node.js'; import type { RenderTarget } from '../../platform/graphics/render-target.js';