Package arc.fx.filters
Class MotionBlurFilter
java.lang.Object
arc.fx.FxFilter
arc.fx.filters.MotionBlurFilter
- All Implemented Interfaces:
Disposable
Motion blur filter that draws the last frame (motion filter included) with a lower opacity.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Defines which function will be used to mix the two frames to produce motion blur effect. -
Field Summary
Fields inherited from class arc.fx.FxFilter
autobind, disabled, inputTexture, outputBuffer, shader, time, u_texture0, u_texture1, u_texture2, u_texture3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Releases all resources of this object.protected void
This method gets called just before rendering.void
rebind()
void
render
(FrameBuffer src, FrameBuffer dst) Concrete objects shall implements its own rendering, given the source and destination buffers.void
resize
(int width, int height) This method should be called once filter will be added.void
Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost.Methods inherited from class arc.fx.FxFilter
compileShader, compileShader, isDisabled, render, setDisabled, setInput, setInput, setOutput, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.util.Disposable
isDisposed
-
Field Details
-
blurOpacity
public float blurOpacity -
lastFrameTex
-
-
Constructor Details
-
MotionBlurFilter
-
-
Method Details
-
resize
public void resize(int width, int height) Description copied from class:FxFilter
This method should be called once filter will be added. Also it must be called on every application resize as usual. -
dispose
public void dispose()Description copied from interface:Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classFxFilter
-
rebind
public void rebind() -
setParams
public void setParams()Description copied from class:FxFilter
Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost. Eg., framebuffer textures should be updated and shader parameters should be reuploaded/rebound. -
onBeforeRender
protected void onBeforeRender()Description copied from class:FxFilter
This method gets called just before rendering.- Overrides:
onBeforeRender
in classFxFilter
-
render
Description copied from class:FxFilter
Concrete objects shall implements its own rendering, given the source and destination buffers.
-