export class ShadowRenderer { static createShadowCamera(device: any, shadowType: any, type: any, face: any): Camera; /** * @param {Renderer} renderer - The renderer. * @param {LightTextureAtlas} lightTextureAtlas - The shadow map atlas. */ constructor(renderer: Renderer, lightTextureAtlas: LightTextureAtlas); /** * A cache of shadow passes. First index is looked up by light type, second by shadow type. * * @type {ShaderPassInfo[][]} * @private */ private shadowPassCache; /** * Reusable list of shadow caster arrays, see {@link ShadowRenderer#_collectCasterLists}. * * @type {MeshInstance[][]} * @private */ private _casterLists; device: import("../../index.js").GraphicsDevice; /** @type {Renderer} */ renderer: Renderer; /** @type {LightTextureAtlas} */ lightTextureAtlas: LightTextureAtlas; sourceId: import("../../index.js").ScopeId; pixelOffsetId: import("../../index.js").ScopeId; weightId: import("../../index.js").ScopeId; blurVsmShader: {}[]; blurVsmWeights: {}; shadowMapLightRadiusId: import("../../index.js").ScopeId; viewUniformFormat: UniformBufferFormat; blendStateWrite: BlendState; blendStateNoWrite: BlendState; _cullShadowCastersInternal(meshInstances: any, visible: any, camera: any): void; /** * Culls the list of shadow casters used by the light by the camera, storing visible mesh * instances in the specified array. * * @param {LayerComposition} comp - The layer composition used as a source of shadow casters, * if those are not provided directly. * @param {Light} light - The light. * @param {MeshInstance[]} visible - The array to store visible mesh instances in. * @param {Camera} camera - The camera. * @param {MeshInstance[]} [casters] - Optional array of mesh instances to use as casters. */ cullShadowCasters(comp: LayerComposition, light: Light, visible: MeshInstance[], camera: Camera, casters?: MeshInstance[]): void; /** * Collects the lists of shadow casters used by the light: either the supplied array of casters, * or the shadow casters of each layer the light is part of. * * @param {LayerComposition} comp - The layer composition used as a source of shadow casters, * if those are not provided directly. * @param {Light} light - The light. * @param {MeshInstance[]} [casters] - Optional array of mesh instances to use as casters. * @returns {MeshInstance[][]} The lists of shadow casters. This is reused between calls, and so * is only valid until the next call. * @private */ private _collectCasterLists; /** * Culls the shadow casters used by an omni light against all six of its cube map faces in a * single pass over the casters, storing the visible mesh instances in the per-face light render * data. This replaces one full pass over the casters per face. * * The six shadow cameras of an omni light are axis aligned in world space - see * {@link LightCamera.pointLightRotations}, and note that {@link ShadowRendererLocal#cull} only * sets the position of an omni light's shadow cameras, never their rotation. Light space is * therefore world space translated by the light position, and each face's frustum is bounded by * a near and a far plane perpendicular to the face axis, plus four side planes through the * light position with the slope of the face's field of view. Testing a caster's bounding sphere * against those planes in light space is a handful of comparisons per face, and uses the same * planes {@link Frustum#containsAabb} would, so the result is the same set of casters (up to * the slab rejection below, which is tighter than a plane test near the frustum corners). * * @param {LayerComposition} comp - The layer composition used as a source of shadow casters, * if those are not provided directly. * @param {Light} light - The omni light. * @param {MeshInstance[]} [casters] - Optional array of mesh instances to use as casters. */ cullShadowCastersOmni(comp: LayerComposition, light: Light, casters?: MeshInstance[]): void; /** * Orders shadow casters by their shader, then their material, then their mesh, so that the * casters sharing a shader, a material and the vertex buffers are submitted together. See * {@link MeshInstance#_sortKeyShadow}. * * @param {MeshInstance} drawCallA - The first mesh instance. * @param {MeshInstance} drawCallB - The second mesh instance. * @returns {number} The sort order. */ sortCompareShader(drawCallA: MeshInstance, drawCallB: MeshInstance): number; setupRenderState(device: any, light: any): void; dispatchUniforms(light: any, shadowCam: any, lightRenderData: any, face: any): void; /** * @param {Light} light - The light. * @returns {number} Index of shadow pass info. */ getShadowPass(light: Light): number; /** * @param {MeshInstance[]} visibleCasters - Visible mesh instances. * @param {Light} light - The light. * @param {Camera} camera - The camera. */ submitCasters(visibleCasters: MeshInstance[], light: Light, camera: Camera): void; needsShadowRendering(light: any): boolean; getLightRenderData(light: any, camera: any, face: any): any; setupRenderPass(renderPass: any, shadowCamera: any, clearRenderTarget: any): void; prepareFace(light: any, camera: any, face: any): any; renderFace(light: any, camera: any, face: any, clear: any): void; renderVsm(light: any, camera: any, cascadeMask?: number): void; getVsmBlurShader(blurMode: any, filterSize: any): any; applyVsmBlur(light: any, camera: any, cascadeMask: any): void; initViewUniformFormat(): void; frameUpdate(): void; } /** * Tests whether a light needs its shadow rendered this frame without consuming one-shot updates. * Shadow-pass scheduling and splat caster culling share this predicate. One-shot requests are * consumed by {@link Culler#consumeOneShotShadows} after both have read the update mode. * Per-face overrides and atlas allocation are checked separately by callers. * * @param {Light} light - The light to test. * @returns {boolean} Whether the light needs a shadow update. * @ignore */ export function needsShadowRendering(light: Light): boolean; import type { Renderer } from './renderer.js'; import type { LightTextureAtlas } from '../lighting/light-texture-atlas.js'; import { UniformBufferFormat } from '../../platform/graphics/uniform-buffer-format.js'; import { BlendState } from '../../platform/graphics/blend-state.js'; import type { LayerComposition } from '../composition/layer-composition.js'; import type { Light } from '../light.js'; import type { MeshInstance } from '../mesh-instance.js'; import type { Camera } from '../camera.js';