Skip to main content

BloomEffect

Multipass bloom: bright areas of the source are extracted, blurred down a progressive downsample ladder, accumulated back up with tent-filter upsampling, and added onto the original image.

Implements ShaderPipelineLike as a non-linear pass graph, so it plugs into either integration point:

// fullscreen
game.graphicsContext.addPostProcessor(
  new ex.ShaderPipelinePostProcessor({
    passes: new ex.BloomEffect({ graphicsContext, threshold: 0.6, intensity: 1.5 })
  })
);

// or per-graphic
actor.graphics.material = new ex.Material({
  graphicsContext,
  passes: new ex.BloomEffect({ graphicsContext, threshold: 0.5 }),
  padding: 32 // room for the bloom halo
});

Implements

Index

Constructors

constructor

Accessors

publicintensity

  • get intensity(): number
  • set intensity(value: number): void
  • Multiplies the bloom light added on top of the original image.

    1 is the neutral amount, values above 1 read as hotter, values below 1 are subtle.


    Returns number

  • Parameters

    • value: number

    Returns void

publicthreshold

  • get threshold(): number
  • set threshold(value: number): void
  • Luminance cutoff (0-1) above which pixels contribute to the bloom


    Returns number

  • Parameters

    • value: number

    Returns void

Methods

publicdispose

  • dispose(): void
  • Returns void

publicprocess