@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
25 lines (24 loc) • 1.01 kB
TypeScript
/**
* A render pass implementing grab of a color buffer.
*
* TODO: implement mipmapped color buffer support for WebGL 1 as well, which requires
* the texture to be a power of two, by first downscaling the captured framebuffer
* texture to smaller power of 2 texture, and then generate mipmaps and use it for rendering
* TODO: or even better, implement blur filter to have smoother lower levels
*
* @ignore
*/
export class RenderPassColorGrab extends RenderPass {
colorRenderTarget: any;
/**
* The source render target to grab the color from.
*
* @type {RenderTarget|null}
*/
source: RenderTarget | null;
shouldReallocate(targetRT: any, sourceTexture: any, sourceFormat: any): boolean;
allocateRenderTarget(renderTarget: any, sourceRenderTarget: any, device: any, format: any): any;
releaseRenderTarget(rt: any): void;
}
import { RenderPass } from '../../platform/graphics/render-pass.js';
import { RenderTarget } from '../../platform/graphics/render-target.js';