Skip to main content

ShaderPipelinePostProcessor

A fullscreen multipass PostProcessor built on ShaderPipeline.

game.graphicsContext.addPostProcessor(new ex.ShaderPipelinePostProcessor({
  passes: [thresholdGlsl, blurHorizontalPass, blurVerticalPass]
}));

Each frame the screen is run through the passes and the final pass renders back into the engine's post processing chain, composing with any other post processors in order.

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

publicreadonlyname

name: string

Accessors

publicpipeline

  • The pipeline run over the screen, available after the post processor is added to the context


    Returns ShaderPipelineLike

Methods

publicdispose

  • dispose(): void
  • Returns void

publicinitialize

  • Called once when the post processor is added to the graphics context


    Parameters

    Returns void

publiconUpdate

  • onUpdate(elapsed: number): void
  • Use the onUpdate hook to update any uniforms in the postprocessors shader

    The shader has already been bound so there is no need to call shader.use();


    Parameters

    • elapsed: number

    Returns void

publicprocess

  • source is the current (MSAA-resolved) screen framebuffer, render the result into destination, for example with a ShaderPass or ShaderPipeline.


    Parameters

    Returns void