LensRenderingPipeline

BABYLON.JS Chromatic Aberration GLSL Shader Author: Olivier Guyot Separates very slightly R, G and B colors on the edges of the screen Inspired by Francois Tarlier & Martins Upitis

Hierarchy

Index

Constructors

constructor

Find examples in Playground
  • constructor

    Effect parameters are as follow: { chromatic_aberration: number; // from 0 to x (1 for realism) edge_blur: number; // from 0 to x (1 for realism) distortion: number; // from 0 to x (1 for realism) grain_amount: number; // from 0 to 1 grain_texture: BABYLON.Texture; // texture to use for grain effect; if unset, use random B&W noise dof_focus_distance: number; // depth-of-field: focus distance; unset to disable (disabled by default) dof_aperture: number; // depth-of-field: focus blur bias (default: 1) dof_darken: number; // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default) dof_pentagon: boolean; // depth-of-field: makes a pentagon-like "bokeh" effect dof_gain: number; // depth-of-field: highlights gain; unset to disable (disabled by default) dof_threshold: number; // depth-of-field: highlights threshold (default: 1) blur_noise: boolean; // add a little bit of noise to the blur (default: true) } Note: if an effect parameter is unset, effect is disabled

    Parameters

    • name: string

      The rendering pipeline name

    • parameters: any

      An object containing all parameters (see above)

    • scene: Scene

      The scene linked to this pipeline

    • Optional ratio: number

      The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)

    • Optional cameras: Camera[]

      The array of cameras that the rendering pipeline will be attached to

    Returns LensRenderingPipeline

Properties

blurNoise

Find examples in Playground
blurNoise: boolean

Gets or sets a boolean indicating if blur noise is enabled

cameras

Find examples in Playground
cameras: Camera[]

Gets the list of attached cameras

chromaticAberration

Find examples in Playground
chromaticAberration: number

Gets or sets the chromatic aberration amount

darkenOutOfFocus

Find examples in Playground
darkenOutOfFocus: number

Gets or sets the darken out of focus amount

dofAperture

Find examples in Playground
dofAperture: number

Gets or sets the depth of field aperture

dofDistortion

Find examples in Playground
dofDistortion: number

Gets or sets the depth of field distortion

edgeBlur

Find examples in Playground
edgeBlur: number

Gets or sets the edge blur

edgeDistortion

Find examples in Playground
edgeDistortion: number

Gets or sets the edge distortion

grainAmount

Find examples in Playground
grainAmount: number

Gets or sets the grain amount

highlightsGain

Find examples in Playground
highlightsGain: number

Gets or sets the highlight grain amount

highlightsThreshold

Find examples in Playground
highlightsThreshold: number

Gets or sets the highlight threshold

inspectableCustomProperties

Find examples in Playground
inspectableCustomProperties: IInspectable[]

List of inspectable custom properties (used by the Inspector)

see

https://doc.babylonjs.com/how_to/debug_layer#extensibility

isSupported

Find examples in Playground
isSupported: boolean

If all the render effects in the pipeline are supported

name

Find examples in Playground
name: string

Gets pipeline name

pentagonBokeh

Find examples in Playground
pentagonBokeh: boolean

Gets or sets a boolean indicating if pentagon bokeh is enabled

scene

Find examples in Playground
scene: Scene

Gets associated scene

Methods

addEffect

Find examples in Playground

disableChromaticAberration

Find examples in Playground
  • disableChromaticAberration(): void
  • Sets chromatic aberration amount to 0

    Returns void

disableDepthOfField

Find examples in Playground
  • disableDepthOfField(): void
  • Disables depth of field

    Returns void

disableEdgeBlur

Find examples in Playground
  • disableEdgeBlur(): void
  • Sets edge blur to 0

    Returns void

disableEdgeDistortion

Find examples in Playground
  • disableEdgeDistortion(): void
  • Sets edge distortion to 0

    Returns void

disableGrain

Find examples in Playground
  • disableGrain(): void
  • Set grain amount to 0

    Returns void

disableHighlights

Find examples in Playground
  • disableHighlights(): void
  • Disables highlights

    Returns void

disableNoiseBlur

Find examples in Playground
  • disableNoiseBlur(): void
  • Disables noise blur

    Returns void

disablePentagonBokeh

Find examples in Playground
  • disablePentagonBokeh(): void
  • Disables the pentagon bokeh effect

    Returns void

dispose

Find examples in Playground
  • dispose(disableDepthRender?: boolean): void
  • Removes the internal pipeline assets and detaches the pipeline from the scene cameras

    Parameters

    • Optional disableDepthRender: boolean

      If the scens depth rendering should be disabled (default: false)

    Returns void

enableNoiseBlur

Find examples in Playground
  • enableNoiseBlur(): void
  • Enables noise blur

    Returns void

enablePentagonBokeh

Find examples in Playground
  • enablePentagonBokeh(): void
  • Creates a pentagon bokeh effect

    Returns void

getClassName

Find examples in Playground
  • getClassName(): string

setAperture

Find examples in Playground
  • setAperture(amount: number): void
  • Sets the Aperture amount

    Parameters

    • amount: number

      amount of Aperture

    Returns void

setChromaticAberration

Find examples in Playground
  • setChromaticAberration(amount: number): void
  • Sets the chromatic aberration amount

    Parameters

    • amount: number

      amount of chromatic aberration

    Returns void

setDarkenOutOfFocus

Find examples in Playground
  • setDarkenOutOfFocus(amount: number): void
  • Sets the DarkenOutOfFocus amount

    Parameters

    • amount: number

      amount of DarkenOutOfFocus

    Returns void

setEdgeBlur

Find examples in Playground
  • setEdgeBlur(amount: number): void
  • Sets the amount of blur at the edges

    Parameters

    • amount: number

      blur amount

    Returns void

setEdgeDistortion

Find examples in Playground
  • setEdgeDistortion(amount: number): void
  • Sets the EdgeDistortion amount

    Parameters

    • amount: number

      amount of EdgeDistortion

    Returns void

setFocusDistance

Find examples in Playground
  • setFocusDistance(amount: number): void
  • Sets the FocusDistance amount

    Parameters

    • amount: number

      amount of FocusDistance

    Returns void

setGrainAmount

Find examples in Playground
  • setGrainAmount(amount: number): void
  • Sets the amout of grain

    Parameters

    • amount: number

      Amount of grain

    Returns void

setHighlightsGain

Find examples in Playground
  • setHighlightsGain(amount: number): void
  • Sets the HighlightsGain amount

    Parameters

    • amount: number

      amount of HighlightsGain

    Returns void

setHighlightsThreshold

Find examples in Playground
  • setHighlightsThreshold(amount: number): void
  • Sets the HighlightsThreshold amount

    Parameters

    • amount: number

      amount of HighlightsThreshold

    Returns void

Generated using TypeDoc