VFX-JS
    Preparing search index...

    Type Alias VFXPass

    A single render pass in a multipass shader pipeline.

    Each pass renders to a named buffer (specified by target), which can be
    referenced as a sampler2D uniform in subsequent passes.
    The last pass in the array renders to the screen.

    Note: auto-bind matches only uniform sampler2D <name>; declarations.
    isampler2D / usampler2D are not supported yet.

    type VFXPass = {
        vert?: string;
        frag: string;
        target?: string;
        persistent?: boolean;
        float?: boolean;
        size?: [number, number];
        uniforms?: VFXUniforms;
        glslVersion?: GlslVersion;
    }
    Index

    Properties

    vert?: string

    Vertex shader code.
    If omitted, the default vertex shader is used.

    frag: string

    Fragment shader code.

    target?: string

    Name of the buffer to write this pass's output to.
    Later passes can reference it as uniform sampler2D <target>;.

    If specified, output is written to a named render target.
    If omitted on an intermediate pass, auto-assigned as pass0, pass1, etc.
    If omitted on the last pass, renders to screen.

    persistent?: boolean

    Whether the render target should persist across frames.
    If enabled, the previous output is available as sampler2D <target>.

    float?: boolean

    Use 32-bit floating point render target. (Default: false)

    size?: [number, number]

    Render target size in pixels [width, height].
    When set, the backbuffer and intermediate buffer are created at this
    fixed size instead of the viewport resolution.

    uniforms?: VFXUniforms

    Uniform values to be passed to this pass's shader.
    Works the same way as element uniforms.

    glslVersion?: GlslVersion