Class PostProcessorEffect
java.lang.Object
gaiasky.render.postprocess.PostProcessorEffect
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
AccumulationBlur, AnaglyphEffect, Antialiasing, Blend, Bloom, CameraMotionBlur, ChromaticAberration, CrtMonitor, CubmeapProjectionEffect, Curvature, DepthBuffer, DrawTexture, FilmGrain, GravitationalDistortion, LensFlare, Levels, LightGlow, LightScattering, Mosaic, Noise, PseudoLensFlare, RaymarchObject, Reprojection, SSR, SurfaceGen, UnsharpMask, Vignette, WarpingMesh, XBRZ, Zoomer
public abstract class PostProcessorEffect
extends Object
implements com.badlogic.gdx.utils.Disposable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Disposable> Array of disposables.protected booleanprotected booleanprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Default implementation uses the resources in the disposables list.booleanWhether this effect is enabled and should be processed.booleanbooleanabstract voidrebind()Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost.abstract voidrender(com.badlogic.gdx.graphics.glutils.FrameBuffer src, com.badlogic.gdx.graphics.glutils.FrameBuffer dest, GaiaSkyFrameBuffer main) Concrete objects shall implement its own rendering, given the source and destination buffers.protected voidrestoreViewport(com.badlogic.gdx.graphics.glutils.FrameBuffer dest) Convenience method to forward the call to the PostProcessor object while still being a non-publicly accessible method.voidsetEnabled(boolean enabled) Sets this effect enabled or not.voidsetEnabledInCubemap(boolean enabled) voidsetEnabledInVR(boolean enabled) voidsetEnabledOptions(boolean enabledInCubemap, boolean enabledInVR) voidRe-compiles the shaders of all filters in this effect.
-
Field Details
-
enabled
protected boolean enabled -
enabledInCubemap
protected boolean enabledInCubemap -
enabledInVR
protected boolean enabledInVR -
disposables
protected com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Disposable> disposablesArray of disposables. -
disposed
protected boolean disposed
-
-
Constructor Details
-
PostProcessorEffect
public PostProcessorEffect()
-
-
Method Details
-
rebind
public abstract void rebind()Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost. E.g., frame buffer textures should be updated and shader parameters should be re-uploaded/rebound. -
render
public abstract void render(com.badlogic.gdx.graphics.glutils.FrameBuffer src, com.badlogic.gdx.graphics.glutils.FrameBuffer dest, GaiaSkyFrameBuffer main) Concrete objects shall implement its own rendering, given the source and destination buffers. -
isEnabled
public boolean isEnabled()Whether this effect is enabled and should be processed. -
setEnabled
public void setEnabled(boolean enabled) Sets this effect enabled or not. -
isEnabledInCubemap
public boolean isEnabledInCubemap() -
isEnabledInVR
public boolean isEnabledInVR() -
setEnabledOptions
public void setEnabledOptions(boolean enabledInCubemap, boolean enabledInVR) -
setEnabledInCubemap
public void setEnabledInCubemap(boolean enabled) -
setEnabledInVR
public void setEnabledInVR(boolean enabled) -
restoreViewport
protected void restoreViewport(com.badlogic.gdx.graphics.glutils.FrameBuffer dest) Convenience method to forward the call to the PostProcessor object while still being a non-publicly accessible method. -
updateShaders
public void updateShaders()Re-compiles the shaders of all filters in this effect. -
dispose
public void dispose()Default implementation uses the resources in the disposables list.- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable
-