The Motion Blur Post Process which blurs an image based on the objects velocity in scene. Velocity can be affected by each object's rotation, position and scale depending on the transformation speed. As an example, all you have to do is to create the post-process: var mb = new BABYLON.MotionBlurPostProcess( 'mb', // The name of the effect. scene, // The scene containing the objects to blur according to their velocity. 1.0, // The required width/height ratio to downsize to before computing the render pass. camera // The camera to apply the render pass to. ); Then, all objects moving, rotating and/or scaling will be blurred depending on the transformation speed.
Creates a new instance MotionBlurPostProcess
The name of the effect.
The scene containing the objects to blur according to their velocity.
The required width/height ratio to downsize to before computing the render pass.
The camera to apply the render pass to.
The sampling mode to be used when computing the pass. (default: 0)
The engine which the post process will be applied. (default: current engine)
If the post process can be reused on the same frame. (default: false)
Type of textures used when performing the post process. (default: 0)
If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
Modify the scale of the post process to be the same as the viewport (default: false)
Sets the setAlphaBlendConstants of the babylon engine
Type of alpha mode to use when performing the post process (default: Engine.ALPHA_DISABLE)
Force textures to be a power of two (default: false)
Animations to be used for the post processing
The aspect ratio of the output texture.
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 color to use when screen clearing
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 the postprocess to be applied without taking in account viewport
Height of the texture to apply the post process on
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.
List of inspectable custom properties (used by the Inspector)
If the post process is supported.
Sets the number of iterations to be used for motion blur quality
Defines how much the image is blurred by the movement. Default value is equal to 1
Name of the PostProcess.
A function that is added to the onActivateObservable
An event triggered when the postprocess is activated.
A function that is added to the onAfterRenderObservable
An event triggered after rendering the postprocess
A function that is added to the onApplyObservable
An event triggered when the postprocess applies its effect.
A function that is added to the onBeforeRenderObservable
An event triggered before rendering the postprocess
A function that is added to the onSizeChangedObservable
An event triggered when the postprocess changes its size.
Sampling mode used by the shader See https://doc.babylonjs.com/classes/3.1/texture
Number of sample textures (default: 1)
Gets the texel size of the postprocess. See https://en.wikipedia.org/wiki/Texel_(graphics)
Gets or sets the unique id of the post process
Width of the texture to apply the post process on
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.
The camera that will be used in the post process. This camera will be used when calling onActivateObservable.
The source texture to be inspected to get the width and height if not specified in the post process constructor. (default: null)
If true, a depth and stencil buffer will be generated. (default: false)
The target texture that was bound to be written to.
Disposes the post process.
The camera to dispose the post process on.
Excludes the given skinned mesh from computing bones velocities. Computing bones velocities can have a cost and that cost. The cost can be saved by calling this function and by passing the skinned mesh reference to ignore.
The mesh containing the skeleton to ignore when computing the velocity map.
Gets the camera which post process is applied to.
The camera the post process is applied to.
Gets a string idenfifying the name of the class
The effect that is created when initializing the post process.
The created effect corresponding the the postprocess.
Returns the fragment url or shader name used in the post process.
the fragment url or name in the shader store.
Gets the engine which this post process belongs to.
The engine the post process was enabled with.
Get a value indicating if the post-process is ready to be used
true if the post-process is ready (shader is compiled)
The post process is reusable if it can be used multiple times within one frame.
If the post process is reusable
invalidate frameBuffer to hint the postprocess to create a depth buffer
Removes the given skinned mesh from the excluded meshes to integrate bones velocities while rendering the velocity map.
The mesh containing the skeleton that has been ignored previously.
Updates the effect with the current post process compile time values and recompiles the shader.
Define statements that should be added at the beginning of the shader. (default: null)
Set of uniform variables that will be passed to the shader. (default: null)
Set of Texture2D variables that will be passed to the shader. (default: null)
The index parameters to be used for babylons include syntax "#include
Called when the shader has been compiled.
Called if there is an error when compiling a shader.
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.
Generated using TypeDoc