ImageProcessingPostProcess

Hierarchy

Index

Constructors

constructor

Find examples in Playground

Properties

adaptScaleToCurrentViewport

Find examples in Playground
adaptScaleToCurrentViewport: boolean

Modify the scale of the post process to be the same as the viewport (default: false)

alphaConstants

Find examples in Playground
alphaConstants: Color4

Sets the setAlphaBlendConstants of the babylon engine

alphaMode

Find examples in Playground
alphaMode: number

Type of alpha mode to use when performing the post process (default: Engine.ALPHA_DISABLE)

alwaysForcePOT

Find examples in Playground
alwaysForcePOT: boolean

Force textures to be a power of two (default: false)

animations

Find examples in Playground
animations: Animation[]

Animations to be used for the post processing

aspectRatio

Find examples in Playground
aspectRatio: number

The aspect ratio of the output texture.

autoClear

Find examples in Playground
autoClear: boolean

If the buffer needs to be cleared before applying the post process. (default: true) Should be set to false if shader will overwrite all previous pixels.

clearColor

Find examples in Playground
clearColor: Color4

Clear color to use when screen clearing

colorCurves

Find examples in Playground
colorCurves: Nullable<ColorCurves>

Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .

colorCurvesEnabled

Find examples in Playground
colorCurvesEnabled: boolean

Sets wether the color curves effect is enabled.

colorGradingEnabled

Find examples in Playground
colorGradingEnabled: boolean

Gets wether the color grading effect is enabled.

colorGradingTexture

Find examples in Playground
colorGradingTexture: Nullable<BaseTexture>

Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.

contrast

Find examples in Playground
contrast: number

Sets contrast used in the effect.

enablePixelPerfectMode

Find examples in Playground
enablePixelPerfectMode: boolean

Enable Pixel Perfect mode where texture is not scaled to be power of 2. Can only be used on a single postprocess or on the last one of a chain. (default: false)

exposure

Find examples in Playground
exposure: number

Sets exposure used in the effect.

forceFullscreenViewport

Find examples in Playground
forceFullscreenViewport: boolean

Force the postprocess to be applied without taking in account viewport

fromLinearSpace

Find examples in Playground
fromLinearSpace: boolean

Sets wether the input of the processing is in Gamma or Linear Space.

height

Find examples in Playground
height: number

Height of the texture to apply the post process on

imageProcessingConfiguration

Find examples in Playground
imageProcessingConfiguration: ImageProcessingConfiguration

Sets the Default image processing configuration used either in the this material.

If sets to null, the scene one is in use.

inputTexture

Find examples in Playground
inputTexture: InternalTexture

The input texture for this post process and the output texture of the previous post process. When added to a pipeline the previous post process will render it's output into this texture and this texture will be used as textureSampler in the fragment shader of this post process.

isSupported

Find examples in Playground
isSupported: boolean

If the post process is supported.

name

Find examples in Playground
name: string

Name of the PostProcess.

onActivate

Find examples in Playground
onActivate: Nullable<function>

A function that is added to the onActivateObservable

onActivateObservable

Find examples in Playground
onActivateObservable: Observable<Camera>

An event triggered when the postprocess is activated.

onAfterRender

Find examples in Playground
onAfterRender: function

A function that is added to the onAfterRenderObservable

Type declaration

    • Parameters

      Returns void

onAfterRenderObservable

Find examples in Playground
onAfterRenderObservable: Observable<Effect>

An event triggered after rendering the postprocess

onApply

Find examples in Playground
onApply: function

A function that is added to the onApplyObservable

Type declaration

    • Parameters

      Returns void

onApplyObservable

Find examples in Playground
onApplyObservable: Observable<Effect>

An event triggered when the postprocess applies its effect.

onBeforeRender

Find examples in Playground
onBeforeRender: function

A function that is added to the onBeforeRenderObservable

Type declaration

    • Parameters

      Returns void

onBeforeRenderObservable

Find examples in Playground
onBeforeRenderObservable: Observable<Effect>

An event triggered before rendering the postprocess

onSizeChanged

Find examples in Playground
onSizeChanged: function

A function that is added to the onSizeChangedObservable

Type declaration

onSizeChangedObservable

Find examples in Playground
onSizeChangedObservable: Observable<PostProcess>

An event triggered when the postprocess changes its size.

renderTargetSamplingMode

Find examples in Playground
renderTargetSamplingMode: number

Sampling mode used by the shader See https://doc.babylonjs.com/classes/3.1/texture

samples

Find examples in Playground
samples: number

Number of sample textures (default: 1)

scaleMode

Find examples in Playground
scaleMode: number

Scale mode for the post process (default: Engine.SCALEMODE_FLOOR)

Value Type Description
1 SCALEMODE_FLOOR engine.scalemode_floor
2 SCALEMODE_NEAREST engine.scalemode_nearest
3 SCALEMODE_CEILING engine.scalemode_ceiling

texelSize

Find examples in Playground
texelSize: Vector2

Gets the texel size of the postprocess. See https://en.wikipedia.org/wiki/Texel_(graphics)

toneMappingEnabled

Find examples in Playground
toneMappingEnabled: boolean

Sets wether tonemapping is enabled or not

vignetteBlendMode

Find examples in Playground
vignetteBlendMode: number

Sets the vignette blend mode allowing different kind of effect.

vignetteCameraFov

Find examples in Playground
vignetteCameraFov: number

Sets Camera field of view used by the Vignette effect.

vignetteCentreX

Find examples in Playground
vignetteCentreX: number

Sets Vignette centre X Offset.

vignetteCentreY

Find examples in Playground
vignetteCentreY: number

Sets Vignette centre Y Offset.

vignetteColor

Find examples in Playground
vignetteColor: Color4

Sets Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode) if vignetteEnabled is set to true.

vignetteEnabled

Find examples in Playground
vignetteEnabled: boolean

Sets wether the vignette effect is enabled.

vignetteStretch

Find examples in Playground
vignetteStretch: number

Sets Vignette stretch size.

vignetteWeight

Find examples in Playground
vignetteWeight: number

Sets Vignette weight or intensity of the vignette effect.

width

Find examples in Playground
width: number

Width of the texture to apply the post process on

Methods

activate

Find examples in Playground
  • Activates the post process by intializing the textures to be used when executed. Notifies onActivateObservable. When this post process is used in a pipeline, this is call will bind the input texture of this post process to the output of the previous.

    Parameters

    • camera: Nullable<Camera>

      The camera that will be used in the post process. This camera will be used when calling onActivateObservable.

    • Optional sourceTexture: Nullable<InternalTexture>

      The source texture to be inspected to get the width and height if not specified in the post process constructor. (default: null)

    • Optional forceDepthStencil: boolean

      If true, a depth and stencil buffer will be generated. (default: false)

    Returns InternalTexture

    The target texture that was bound to be written to.

apply

Find examples in Playground
  • Binds all textures and uniforms to the shader, this will be run on every pass.

    Returns Nullable<Effect>

    the effect corrisponding to this post process. Null if not compiled or not ready.

dispose

Find examples in Playground
  • dispose(camera?: Camera): void

getCamera

Find examples in Playground
  • Gets the camera which post process is applied to.

    Returns Camera

    The camera the post process is applied to.

getClassName

Find examples in Playground
  • getClassName(): string
  • "ImageProcessingPostProcess"

    Returns string

    "ImageProcessingPostProcess"

getEffect

Find examples in Playground
  • The effect that is created when initializing the post process.

    Returns Effect

    The created effect corrisponding the the postprocess.

getEngine

Find examples in Playground
  • Gets the engine which this post process belongs to.

    Returns Engine

    The engine the post process was enabled with.

isReady

Find examples in Playground
  • isReady(): boolean
  • Get a value indicating if the post-process is ready to be used

    Returns boolean

    true if the post-process is ready (shader is compiled)

isReusable

Find examples in Playground
  • isReusable(): boolean
  • The post process is reusable if it can be used multiple times within one frame.

    Returns boolean

    If the post process is reusable

markTextureDirty

Find examples in Playground
  • markTextureDirty(): void

shareOutputWith

Find examples in Playground
  • To avoid multiple redundant textures for multiple post process, the output the output texture for this post process can be shared with another.

    Parameters

    • postProcess: PostProcess

      The post process to share the output with.

    Returns PostProcess

    This post process.

updateEffect

Find examples in Playground
  • updateEffect(defines?: Nullable<string>, uniforms?: Nullable<string[]>, samplers?: Nullable<string[]>, indexParameters?: any, onCompiled?: function, onError?: function): void
  • Updates the effect with the current post process compile time values and recompiles the shader.

    Parameters

    • Optional defines: Nullable<string>

      Define statements that should be added at the beginning of the shader. (default: null)

    • Optional uniforms: Nullable<string[]>

      Set of uniform variables that will be passed to the shader. (default: null)

    • Optional samplers: Nullable<string[]>

      Set of Texture2D variables that will be passed to the shader. (default: null)

    • Optional indexParameters: any

      The index parameters to be used for babylons include syntax "#include[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx

    • Optional onCompiled: function

      Called when the shader has been compiled.

        • Parameters

          Returns void

    • Optional onError: function

      Called if there is an error when compiling a shader.

        • (effect: Effect, errors: string): void
        • Parameters

          • effect: Effect
          • errors: string

          Returns void

    Returns void

useOwnOutput

Find examples in Playground
  • useOwnOutput(): void
  • Reverses the effect of calling shareOutputWith and returns the post process back to its original state. This should be called if the post process that shares output with this post process is disabled/disposed.

    Returns void

Generated using TypeDoc