Class Filter<T>
java.lang.Object
gaiasky.render.postprocess.filters.Filter<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
AccumulationBlurFilter, AnaglyphFilter, BiasFilter, BlendFullHalfResFilter, CameraMotionBlurFilter, ChromaticAberrationFilter, Combine3Filter, CombineFilter, Convolve1DFilter, CopyFilter, CrtScreenFilter, CubemapProjectionsFilter, DepthBufferFilter, FilmGrainFilter, FxaaFilter, GlowFilter, GravitationalDistortionFilter, LensDirtFilter, LensFlareFilter, LevelsFilter, LightScatteringFilter, LumaFilter, MosaicFilter, NfaaFilter, NoiseFilter, PseudoLensFlareFilter, RadialBlurFilter, RadialDistortionFilter, ReprojectionFilter, SurfaceGenFilter, ThresholdFilter, UnsharpMaskFilter, VignettingFilter, WarpingMeshFilter, XBRZUpscaleFilter, ZoomFilter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected 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 FullscreenQuadprotected static final intprotected static final intprotected static final intprotected static final intprotected String -
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(Filter.Parameter param, boolean value) protected voidsetParam(Filter.Parameter param, float value) protected voidsetParam(Filter.Parameter param, int value) protected voidsetParam(Filter.Parameter param, com.badlogic.gdx.graphics.Color value) protected TsetParam(Filter.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected TsetParam(Filter.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected voidsetParam(Filter.Parameter param, com.badlogic.gdx.math.Vector2 value) protected voidsetParam(Filter.Parameter param, com.badlogic.gdx.math.Vector3 value) protected voidsetParam(Filter.Parameter param, com.badlogic.gdx.math.Vector4 value) protected TsetParams(Filter.Parameter param, boolean value) protected TsetParams(Filter.Parameter param, float value) Sets the parameter to the specified value for this filter.protected TsetParams(Filter.Parameter param, int value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.graphics.Color value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.math.Matrix3 value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.math.Matrix4 value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.math.Vector2 value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.math.Vector3 value) protected TsetParams(Filter.Parameter param, com.badlogic.gdx.math.Vector4 value) protected TsetParamsv(Filter.Parameter param, float[] values, int offset, int length) protected TsetParamv(Filter.Parameter param, float[] values, int offset, int length) voidDisposes the current shader, reloads it from disk and re-compiles it.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:
-
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 -
vertexShaderName
-
fragmentShaderName
-
defines
-
-
Constructor Details
-
Filter
-
Filter
-
Filter
protected Filter(com.badlogic.gdx.graphics.glutils.ShaderProgram program)
-
-
Method Details
-
setInput
-
setInput
-
setOutput
-
updateProgram
public void updateProgram()Disposes the current shader, reloads it from disk and re-compiles it. Run synchronously. -
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:
disposein interfacecom.badlogic.gdx.utils.Disposable
-
rebind
public abstract void rebind() -
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParamv
-
setParam
-
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
-
setParams
-
setParams
-
setParamsv
-
setParams
-
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()
-