PostProcess

PostProcess

Description

class PostProcess

Constructor

new PostProcess(name, fragmentUrl, parameters, samplers, options, PostProcessOptions, camera, samplingMode, engine, reusable, defines, textureType, vertexUrl, indexParameters, blockCompilation)

Parameters

Name Type Description
name string
fragmentUrl string
parameters Nullable<string[]>
samplers Nullable<string[]>
options number or PostProcessOptions
camera Nullable<Camera>
optional samplingMode number
optional engine Engine
optional reusable boolean
optional defines Nullable<string>
optional textureType number
optional vertexUrl string
optional indexParameters any

Members

name : string

width : number

height : number

renderTargetSamplingMode : number

clearColor : Color4

autoClear : boolean

alphaMode : number

alphaConstants : Color4

animations : Animation[]

enablePixelPerfectMode : boolean

scaleMode : number

alwaysForcePOT : boolean

samples : number

adaptScaleToCurrentViewport : boolean

onActivateObservable : Observable<Camera>

An event triggered when the postprocess is activated.

@type {BABYLON.Observable}

onActivate : Nullable<(camera: Camera) => void>

onSizeChangedObservable : Observable<PostProcess>

An event triggered when the postprocess changes its size.

@type {BABYLON.Observable}

onSizeChanged : (postProcess: PostProcess) => void

Parameters

Name Type Description
postProcess PostProcess

onApplyObservable : Observable<Effect>

An event triggered when the postprocess applies its effect.

@type {BABYLON.Observable}

onApply : (effect: Effect) => void

Parameters

Name Type Description
effect Effect

onBeforeRenderObservable : Observable<Effect>

An event triggered before rendering the postprocess

@type {BABYLON.Observable}

onBeforeRender : (effect: Effect) => void

Parameters

Name Type Description
effect Effect

onAfterRenderObservable : Observable<Effect>

An event triggered after rendering the postprocess

@type {BABYLON.Observable}

onAfterRender : (efect: Effect) => void

Parameters

Name Type Description
efect Effect

outputTexture : InternalTexture

texelSize : Vector2

isSupported : boolean

aspectRatio : number

Methods

getCamera() Camera

getEngine() Engine

getEffect() Effect

shareOutputWith(postProcess) PostProcess

Parameters

Name Type Description
postProcess PostProcess

updateEffect(defines, uniforms, samplers, indexParameters, onCompiled, onError) void

Parameters

Name Type Description
optional defines Nullable<string>
optional uniforms Nullable<string[]>
optional samplers Nullable<string[]>
optional indexParameters any
optional onCompiled effect Effect

| optional | onError | | effect | Effect |

isReusable() boolean

markTextureDirty() void

activate(camera, sourceTexture, forceDepthStencil) void

Parameters

Name Type Description
camera Nullable<Camera>
optional sourceTexture Nullable<InternalTexture>
optional forceDepthStencil boolean

apply() Nullable<Effect>

dispose(camera) void

Parameters

Name Type Description
optional camera Camera