VFX-JS
    Preparing search index...

    Type Alias EffectRenderTarget

    A handle to an offscreen render target.

    ctx.createRenderTarget(...) returns EffectRenderTarget as
    the handle of the raw WebGL framebuffer.
    You can use it as a draw target (ctx.draw({ target: rt })) and
    as a sampler2D uniform to read it back in a later pass.

    width / height are physical pixels.

    Call dispose() to release the underlying GL resources eagerly.
    Idempotent. Framework-owned RTs (e.g. ctx.target, ctx.src) ignore
    the call. Do not use the handle after disposing it.

    type EffectRenderTarget = {
        width: number;
        height: number;
        __brand: "EffectRenderTarget";
        dispose(): void;
        generateMipmaps(): void;
    }
    Index

    Properties

    width: number
    height: number
    __brand: "EffectRenderTarget"

    Methods

    • Regenerate mips from level 0. No-op when the RT was not created
      with mipmap: true | "manual". Auto mode regenerates after every
      draw already; call this in "manual" mode after the last draw
      before the RT is sampled at non-zero LOD.

      Returns void