/** * @import { GraphicsDevice } from '../../../../platform/graphics/graphics-device.js' * @import { CameraComponent } from '../../../../framework/components/camera/component.js' */ /** * Render pass implementation of Depth of Field effect. * * @category Graphics * @ignore */ export class FramePassDof extends FramePass { /** * @param {GraphicsDevice} device - The graphics device. * @param {CameraComponent} cameraComponent - The camera component. * @param {Texture} sizeTexture - A texture of the full resolution of the scene, which the CoC is * rendered at. * @param {Texture} sceneTextureHalf - The half resolution texture. * @param {boolean} highQuality - Whether to use high quality setup, which blurs the full * resolution scene, set with {@link FramePassDof#setSceneTexture}. * @param {boolean} nearBlur - Whether to apply near blur. */ constructor(device: GraphicsDevice, cameraComponent: CameraComponent, sizeTexture: Texture, sceneTextureHalf: Texture, highQuality: boolean, nearBlur: boolean); focusDistance: number; focusRange: number; blurRadius: number; blurRings: number; blurRingPoints: number; highQuality: boolean; /** @type {Texture|null} */ cocTexture: Texture | null; /** @type {Texture|null} */ blurTexture: Texture | null; /** @type {RenderPassCoC|null} */ cocPass: RenderPassCoC | null; /** @type {RenderPassDownsample|null} */ farPass: RenderPassDownsample | null; /** @type {RenderPassDofBlur|null} */ blurPass: RenderPassDofBlur | null; cocRT: RenderTarget; farRt: RenderTarget; blurRt: RenderTarget; destroyRenderPasses(): void; destroyRT(rt: any): void; setupCocPass(device: any, cameraComponent: any, sourceTexture: any, nearBlur: any): RenderPassCoC; setupFarPass(device: any, sourceTexture: any, format: any, scale: any): RenderPassDownsample; setupBlurPass(device: any, nearTexture: any, nearBlur: any, scale: any): RenderPassDofBlur; createTexture(name: any, format: any): Texture; createRenderTarget(name: any, format: any): RenderTarget; /** * Sets the full resolution scene texture the blur reads. Set every frame, as with TAA enabled * it alternates between the two TAA history textures. * * @param {Texture} texture - The full resolution scene texture. */ setSceneTexture(texture: Texture): void; } import { FramePass } from '../../../../platform/graphics/frame-pass.js'; import { Texture } from '../../../../platform/graphics/texture.js'; import { RenderPassCoC } from './render-pass-coc.js'; import { RenderPassDownsample } from '../../../render-passes/render-pass-downsample.js'; import { RenderPassDofBlur } from './render-pass-dof-blur.js'; import { RenderTarget } from '../../../../platform/graphics/render-target.js'; import type { GraphicsDevice } from '../../../../platform/graphics/graphics-device.js'; import type { CameraComponent } from '../../../../framework/components/camera/component.js';