LensRenderingPipeline

PostProcessPostProcessRenderPipeline

Description

class LensRenderingPipeline extends PostProcessRenderPipeline

Constructor

new LensRenderingPipeline(name, parameters, scene, ratio, cameras)

@constructor

     * [Effect](/classes/3.1/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](/classes/3.1/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

     * @param {string} name - The rendering pipeline name

Parameters

Name Type Description
name string
parameters any
scene Scene
optional ratio number

Members

LensChromaticAberrationEffect : string

The chromatic aberration PostProcess id in the pipeline

@type {string}

HighlightsEnhancingEffect : string

The highlights enhancing PostProcess id in the pipeline

@type {string}

LensDepthOfFieldEffect : string

The depth-of-field PostProcess id in the pipeline

@type {string}

Methods

setEdgeBlur(amount) void

Parameters

Name Type Description
amount number

disableEdgeBlur() void

setGrainAmount(amount) void

Parameters

Name Type Description
amount number

disableGrain() void

setChromaticAberration(amount) void

Parameters

Name Type Description
amount number

disableChromaticAberration() void

setEdgeDistortion(amount) void

Parameters

Name Type Description
amount number

disableEdgeDistortion() void

setFocusDistance(amount) void

Parameters

Name Type Description
amount number

disableDepthOfField() void

setAperture(amount) void

Parameters

Name Type Description
amount number

setDarkenOutOfFocus(amount) void

Parameters

Name Type Description
amount number

enablePentagonBokeh() void

disablePentagonBokeh() void

enableNoiseBlur() void

disableNoiseBlur() void

setHighlightsGain(amount) void

Parameters

Name Type Description
amount number

setHighlightsThreshold(amount) void

Parameters

Name Type Description
amount number

disableHighlights() void

dispose(disableDepthRender) void

Removes the internal pipeline assets and detaches the pipeline from the scene cameras

Parameters

Name Type Description
optional disableDepthRender boolean