Class ImageProcessingPostProcess
Hierarchy
-
PostProcess
- ImageProcessingPostProcess
Index
Constructors
Properties
- adapt
Scale ToCurrent Viewport - alpha
Constants - alpha
Mode - always
ForcePOT - animations
- auto
Clear - clear
Color - enable
Pixel Perfect Mode - force
Fullscreen Viewport - height
- inspectable
Custom Properties - name
- node
Material Source - on
Activate Observable - on
After Render Observable - on
Apply Observable - on
Before Render Observable - on
Size Changed Observable - render
Target Sampling Mode - scale
Mode - unique
Id - width
Accessors
- aspect
Ratio - color
Curves - color
Curves Enabled - color
Grading Enabled - color
Grading Texture - contrast
- exposure
- from
Linear Space - image
Processing Configuration - input
Texture - is
Supported - on
Activate - on
After Render - on
Apply - on
Before Render - on
Size Changed - samples
- texel
Size - tone
Mapping Enabled - tone
Mapping Type - vignette
Blend Mode - vignette
Camera Fov - vignette
CentreX - vignette
CentreY - vignette
Color - vignette
Enabled - vignette
Stretch - vignette
Weight
Methods
Constructors
constructor
-
Parameters
-
name: string
-
options: number | PostProcessOptions
-
Optional camera: Nullable<Camera>
-
Optional samplingMode: number
-
Optional engine: Engine
-
Optional reusable: boolean
-
Optional textureType: number
-
Optional imageProcessingConfiguration: ImageProcessingConfiguration
Returns ImageProcessingPostProcess
-
Properties
adapt Scale ToCurrent ViewportSearch playground for adaptScaleToCurrentViewport
Modify the scale of the post process to be the same as the viewport (default: false)
alpha ConstantsSearch playground for alphaConstants
Sets the setAlphaBlendConstants of the babylon engine
alpha ModeSearch playground for alphaMode
Type of alpha mode to use when performing the post process (default: Engine.ALPHA_DISABLE)
always ForcePOTSearch playground for alwaysForcePOT
Force textures to be a power of two (default: false)
animationsSearch playground for animations
Animations to be used for the post processing
auto ClearSearch playground for autoClear
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.
clear ColorSearch playground for clearColor
Clear color to use when screen clearing
enable Pixel Perfect ModeSearch playground for enablePixelPerfectMode
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)
force Fullscreen ViewportSearch playground for forceFullscreenViewport
Force the postprocess to be applied without taking in account viewport
heightSearch playground for height
Height of the texture to apply the post process on
inspectable Custom PropertiesSearch playground for inspectableCustomProperties
List of inspectable custom properties (used by the Inspector)
nameSearch playground for name
Name of the PostProcess.
node Material SourceSearch playground for nodeMaterialSource
Gets the node material used to create this postprocess (null if the postprocess was manually created)
on Activate ObservableSearch playground for onActivateObservable
An event triggered when the postprocess is activated.
on After Render ObservableSearch playground for onAfterRenderObservable
An event triggered after rendering the postprocess
on Apply ObservableSearch playground for onApplyObservable
An event triggered when the postprocess applies its effect.
on Before Render ObservableSearch playground for onBeforeRenderObservable
An event triggered before rendering the postprocess
on Size Changed ObservableSearch playground for onSizeChangedObservable
An event triggered when the postprocess changes its size.
render Target Sampling ModeSearch playground for renderTargetSamplingMode
Sampling mode used by the shader See https://doc.babylonjs.com/classes/3.1/texture
scale ModeSearch playground for scaleMode
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 |
unique IdSearch playground for uniqueId
Gets or sets the unique id of the post process
widthSearch playground for width
Width of the texture to apply the post process on
Accessors
aspect Ratio
-
The aspect ratio of the output texture.
Returns number
color Curves
-
Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
Returns Nullable<ColorCurves>
-
Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
Parameters
-
value: Nullable<ColorCurves>
Returns any
-
color Curves Enabled
-
Gets wether the color curves effect is enabled.
Returns boolean
-
Sets wether the color curves effect is enabled.
Parameters
-
value: boolean
Returns any
-
color Grading Enabled
-
Gets wether the color grading effect is enabled.
Returns boolean
-
Gets wether the color grading effect is enabled.
Parameters
-
value: boolean
Returns any
-
color Grading Texture
-
Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
Returns Nullable<BaseTexture>
-
Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
Parameters
-
value: Nullable<BaseTexture>
Returns any
-
contrast
-
Gets contrast used in the effect.
Returns number
-
Sets contrast used in the effect.
Parameters
-
value: number
Returns any
-
exposure
-
Gets exposure used in the effect.
Returns number
-
Sets exposure used in the effect.
Parameters
-
value: number
Returns any
-
from Linear Space
-
Gets wether the input of the processing is in Gamma or Linear Space.
Returns boolean
-
Sets wether the input of the processing is in Gamma or Linear Space.
Parameters
-
value: boolean
Returns any
-
image Processing Configuration
-
Gets the image processing configuration used either in this material.
If sets to null, the scene one is in use.
Returns ImageProcessingConfiguration
-
Sets the Default image processing configuration used either in the this material.
If sets to null, the scene one is in use.
Parameters
-
value: ImageProcessingConfiguration
Returns any
-
input Texture
-
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.
Returns 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.
Parameters
-
value: InternalTexture
Returns any
-
is Supported
-
If the post process is supported.
Returns boolean
on Activate
on After Render
on Apply
on Before Render
on Size Changed
-
A function that is added to the onSizeChangedObservable
Parameters
-
callback: (postProcess: PostProcess) => void
-
-
Parameters
-
postProcess: PostProcess
Returns void
-
-
-
Returns any
-
samples
-
Number of sample textures (default: 1)
Returns number
-
Number of sample textures (default: 1)
Parameters
-
n: number
Returns any
-
texel Size
-
Gets the texel size of the postprocess. See https://en.wikipedia.org/wiki/Texel_(graphics)
Returns Vector2
tone Mapping Enabled
-
Gets wether tonemapping is enabled or not.
Returns boolean
-
Sets wether tonemapping is enabled or not
Parameters
-
value: boolean
Returns any
-
tone Mapping Type
-
Gets the type of tone mapping effect.
Returns number
-
Sets the type of tone mapping effect.
Parameters
-
value: number
Returns any
-
vignette Blend Mode
-
Gets the vignette blend mode allowing different kind of effect.
Returns number
-
Sets the vignette blend mode allowing different kind of effect.
Parameters
-
value: number
Returns any
-
vignette Camera Fov
-
Gets Camera field of view used by the Vignette effect.
Returns number
-
Sets Camera field of view used by the Vignette effect.
Parameters
-
value: number
Returns any
-
vignette CentreX
-
Gets Vignette centre X Offset.
Returns number
-
Sets Vignette centre X Offset.
Parameters
-
value: number
Returns any
-
vignette CentreY
-
Gets Vignette centre Y Offset.
Returns number
-
Sets Vignette centre Y Offset.
Parameters
-
value: number
Returns any
-
vignette Color
-
Gets Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode) if vignetteEnabled is set to true.
Returns Color4
-
Sets Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode) if vignetteEnabled is set to true.
Parameters
-
value: Color4
Returns any
-
vignette Enabled
-
Gets wether the vignette effect is enabled.
Returns boolean
-
Sets wether the vignette effect is enabled.
Parameters
-
value: boolean
Returns any
-
vignette Stretch
-
Gets Vignette stretch size.
Returns number
-
Sets Vignette stretch size.
Parameters
-
value: number
Returns any
-
vignette Weight
-
Gets Vignette weight or intensity of the vignette effect.
Returns number
-
Sets Vignette weight or intensity of the vignette effect.
Parameters
-
value: number
Returns any
-
Methods
activateSearch playground for activate
-
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.
-
applySearch playground for apply
disposeSearch playground for dispose
-
Parameters
-
Optional camera: Camera
Returns void
-
get CameraSearch playground for getCamera
-
Gets the camera which post process is applied to.
Returns Camera
The camera the post process is applied to.
get Class NameSearch playground for getClassName
-
"ImageProcessingPostProcess"
Returns string
"ImageProcessingPostProcess"
get EffectSearch playground for getEffect
-
The effect that is created when initializing the post process.
Returns Effect
The created effect corresponding the the postprocess.
get Effect NameSearch playground for getEffectName
-
Returns the fragment url or shader name used in the post process.
Returns string
the fragment url or name in the shader store.
get EngineSearch playground for getEngine
-
Gets the engine which this post process belongs to.
Returns Engine
The engine the post process was enabled with.
is ReadySearch playground for isReady
-
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)
is ReusableSearch playground for isReusable
-
The post process is reusable if it can be used multiple times within one frame.
Returns boolean
If the post process is reusable
mark Texture DirtySearch playground for markTextureDirty
-
invalidate frameBuffer to hint the postprocess to create a depth buffer
Returns void
restore Default Input TextureSearch playground for restoreDefaultInputTexture
-
Since inputTexture should always be defined, if we previously manually set
inputTexture
, the only way to unset it is to use this function to restore its internal stateReturns void
serializeSearch playground for serialize
-
Serializes the particle system to a JSON object
Returns any
the JSON object
set Pre Pass RendererSearch playground for setPrePassRenderer
-
Sets the required values to the prepass renderer.
Parameters
-
prePassRenderer: PrePassRenderer
defines the prepass renderer to setup.
Returns boolean
true if the pre pass is needed.
-
share Output WithSearch playground for shareOutputWith
-
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.
-
update Effect
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.fxOptional onCompiled: (effect: Effect) => void
Called when the shader has been compiled.
-
-
Parameters
-
effect: Effect
Returns void
-
-
Optional onError: (effect: Effect, errors: string) => void
Called if there is an error when compiling a shader.
-
-
Parameters
-
effect: Effect
-
errors: string
Returns void
-
-
Optional vertexUrl: string
The url of the vertex shader to be used (default: the one given at construction time)
Optional fragmentUrl: string
The url of the fragment shader to be used (default: the one given at construction time)
Returns void
use Own OutputSearch playground for useOwnOutput
-
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
Static ParseSearch playground for Parse
-
Creates a material from parsed material data
Parameters
-
parsedPostProcess: any
defines parsed post process data
-
scene: Scene
defines the hosting scene
-
rootUrl: string
defines the root URL to use to load textures
Returns Nullable<PostProcess>
a new post process
-
ImageProcessingPostProcess
https://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing