VFX-JS
    Preparing search index...

    Type Alias EffectDrawOpts

    type EffectDrawOpts = {
        frag: string;
        vert?: string;
        geometry?: EffectQuad | EffectGeometry;
        uniforms?: EffectUniforms;
        target?: EffectRenderTarget | null;
        blend?: EffectBlendMode;
        swap?: boolean;
    }
    Index

    Properties

    frag: string
    vert?: string

    Default: ctx.quad.

    uniforms?: EffectUniforms
    target?: EffectRenderTarget | null

    Render target of the effect.
    It renders to the Canvas if omitted (or null).

    Blend mode override. Default: "premultiplied" when drawing to
    the canvas (target null/omitted), "none" when drawing to a
    user-allocated render target. Use "additive" for accumulating
    draws like sparkles or particle stamps.

    swap?: boolean

    Whether to advance the persistent RT's read/write buffers after
    this draw. Default: true.

    Set to false when you need to write to the same physical buffer
    across multiple draws in one frame — e.g. a full-screen pass that
    fills every texel followed by a sparse pass that surgically
    overwrites a few. Without swap: false, the second draw would
    land in the other (stale) buffer of the ping-pong pair and the
    first draw's output would be lost.

    No-op for non-persistent RTs and for canvas writes.