Class Filter3<T>
java.lang.Object
gaiasky.util.gdx.contrib.postprocess.filters.Filter3<T>
- Direct Known Subclasses:
RaymarchingFilter,SSRFilter
The base class for any single-pass filter.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.badlogic.gdx.graphics.glutils.FrameBufferprotected com.badlogic.gdx.graphics.Textureprotected com.badlogic.gdx.graphics.glutils.FrameBufferprotected com.badlogic.gdx.graphics.glutils.ShaderProgramprotected static final FullscreenQuad3protected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()protected voidShould be called after any one or more setParams method calls.protected abstract voidThis method will get called just before a rendering operation occurs.protected voidabstract voidrebind()final voidrender()setInput(com.badlogic.gdx.graphics.glutils.FrameBuffer input) setInput(com.badlogic.gdx.graphics.Texture input) setOutput(com.badlogic.gdx.graphics.glutils.FrameBuffer output) protected voidsetParam(Filter3.Parameter param, float value) protected voidsetParam(Filter3.Parameter param, int value) protected TsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected TsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected voidsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value) protected voidsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value) protected TsetParams(Filter3.Parameter param, float value) Sets the parameter to the specified value for this filter.protected TsetParams(Filter3.Parameter param, int value) protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value) protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value) protected TsetParamsv(Filter3.Parameter param, float[] values, int offset, int length) protected TsetParamv(Filter3.Parameter param, float[] values, int offset, int length) voidupdateProgram(com.badlogic.gdx.graphics.glutils.ShaderProgram program) Caution, disposes of the current program and updates it with the new one.
-
Field Details
-
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:
-
u_texture4
protected static final int u_texture4- 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
public 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() -
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()
-