/** * @import { CameraFrameEffectPasses, CameraFrameEffectResources, CameraFrameEffectScene } from '../../render-passes/camera-frame-effect.js' * @import { GraphicsDevice } from '../../../platform/graphics/graphics-device.js' */ /** * The temporal anti-aliasing (TAA) effect, a technique used to reduce aliasing in the rendered * image by blending multiple frames together over time. The camera is offset by a different * fraction of a pixel every frame, and each frame is accumulated into a history, reprojected using * the scene depth to follow the motion of the camera. * * The effect resolves the scene before the other effects read it, so that the depth of field, the * bloom and the composition all work with the anti-aliased scene. It can also upscale a scene * rendered at a lower resolution, see {@link TaaEffect#upscale}. * * Every {@link CameraFrame} constructs and registers one, available as {@link CameraFrame#taa}. * * @category Graphics */ export class TaaEffect extends CameraFrameEffect { /** * @param {GraphicsDevice} device - The graphics device. */ constructor(device: GraphicsDevice); /** * The intensity of the camera jitter, 0-1 range. The larger the value, the more jitter is * applied to the camera, making the anti-aliasing effect more pronounced. This also makes the * image more blurry, and rendering.sharpness parameter of the {@link CameraFrame} can be used * to counteract. Defaults to 1. * * @type {number} */ jitter: number; /** * Whether TAA accumulates the frames rendered at a lower resolution, see * rendering.renderTargetScale of the {@link CameraFrame}, at the full resolution - the jitter * placing their samples at different positions within the full resolution pixels, which * recovers detail lost to the lower resolution. Moving objects can blur or ghost more than with * TAA alone, as the history is relied on for longer while upscaling. Defaults to false. * * @type {boolean} */ upscale: boolean; /** * The pass resolving the scene, while the effect's passes exist. * * @type {RenderPassTAA|null} * @private */ private _pass; /** * Whether the existing pass upscales. * * @type {boolean} * @private */ private _upscale; } import { CameraFrameEffect } from '../../render-passes/camera-frame-effect.js'; import type { GraphicsDevice } from '../../../platform/graphics/graphics-device.js';