Class Filter3<T>
java.lang.Object
gaiasky.render.postprocess.filters.Filter3<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
RaymarchingFilter
,SSRFilter
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.badlogic.gdx.graphics.glutils.FrameBuffer
protected com.badlogic.gdx.graphics.Texture
protected static final Logger.Log
protected com.badlogic.gdx.graphics.glutils.FrameBuffer
protected com.badlogic.gdx.graphics.glutils.ShaderProgram
protected static final FullscreenQuad3
protected static final int
protected static final int
protected static final int
protected static final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
Filter3
(com.badlogic.gdx.graphics.glutils.ShaderProgram program) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
protected void
Should be called after any one or more setParams method calls.protected abstract void
This method will get called just before a rendering operation occurs.protected void
abstract void
rebind()
final void
render()
setInput
(com.badlogic.gdx.graphics.glutils.FrameBuffer input) setInput
(com.badlogic.gdx.graphics.Texture input) setOutput
(com.badlogic.gdx.graphics.glutils.FrameBuffer output) protected void
setParam
(Filter3.Parameter param, float value) protected void
setParam
(Filter3.Parameter param, int value) protected T
setParam
(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected T
setParam
(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected void
setParam
(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value) protected void
setParam
(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value) protected T
setParams
(Filter3.Parameter param, float value) Sets the parameter to the specified value for this filter.protected T
setParams
(Filter3.Parameter param, int value) protected T
setParams
(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected T
setParams
(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected T
setParams
(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value) protected T
setParams
(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value) protected T
setParamsv
(Filter3.Parameter param, float[] values, int offset, int length) protected T
setParamv
(Filter3.Parameter param, float[] values, int offset, int length) void
updateProgram
(com.badlogic.gdx.graphics.glutils.ShaderProgram program) Caution, disposes of the current program and updates it with the new one.
-
Field Details
-
logger
-
quad
-
u_texture0
protected static final int u_texture0- See Also:
-
u_texture1
protected static final int u_texture1- See Also:
-
u_texture2
protected static final int u_texture2- See Also:
-
u_texture3
protected static final int u_texture3- See Also:
-
inputTexture
protected com.badlogic.gdx.graphics.Texture inputTexture -
inputBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer inputBuffer -
outputBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer outputBuffer -
program
protected com.badlogic.gdx.graphics.glutils.ShaderProgram program
-
-
Constructor Details
-
Filter3
protected Filter3(com.badlogic.gdx.graphics.glutils.ShaderProgram program)
-
-
Method Details
-
setInput
-
setInput
-
setOutput
-
updateProgram
public void updateProgram(com.badlogic.gdx.graphics.glutils.ShaderProgram program) Caution, disposes of the current program and updates it with the new one. Run synchronously after render().- Parameters:
program
- The new shader program.
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
rebind
public abstract void rebind() -
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParamv
-
setParams
Sets the parameter to the specified value for this filter. When you are finished building the batch you shall signal it by invoking endParams(). -
setParams
-
setParams
-
setParams
-
setParams
-
setParams
-
setParamsv
-
endParams
protected void endParams()Should be called after any one or more setParams method calls. -
onBeforeRender
protected abstract void onBeforeRender()This method will get called just before a rendering operation occurs. -
render
public final void render() -
realRender
protected void realRender()
-