An easy entry to shaders with LibGDX



via libgdx-contribs-postprocessing and Alcove Games.

If you do want to add some fancy blooms and zooms and there’s a little allergy in you for coding in glsl you can work with fantastic library with ready to work effects.
I won’t explain importing – it’s already done on the project’s site and it’s super easy idiot-proof.
I recorded a short introduction to what it offers on some gifs below;
Each effect (source linked) presented on a GIF:



this effect is INCOMPLETE!


Depending on a constructor it can look in 3 ways:

public CrtMonitor (int fboWidth, int fboHeight, boolean barrelDistortion, boolean performBlur, RgbMode mode, int effectsSupport){…}

For ex:

CrtMonitor crtMonitor = new CrtMonitor(800, 480, false, false, RgbMode.RgbShift, 0);


chromatic aberrations.gif


rgb shift.gif


crt monitor none.gif



Not my video but presents effect well.

(combined with CrtMonitor effect)


Deprecated, use the LensFlare2.


Pseudo lens flare implementation. This is a post-processing effect entirely, no need for light positions or anything. It includes ghost generation, halos, chromatic distortion and blur.
@author Toni Sagrista

Gif soon.


A motion blur effect which draws the last frame with a lower opacity. The result is then stored as the next last frame to create the trail effect.
@author Toni Sagrista





Implements a zooming effect: either a radial blur filter or a zoom filter is used.



You didn’t expect me recording antialiasing example on a gif duh?


Just an abstract class.


Implements the normal filter anti-aliasing. Very fast and useful for combining with other post-processing effects.
@author Toni Sagrista


Implements the fast approximate anti-aliasing. Very fast and useful for combining with other post-processing effects.
@author Toni Sagrista

Although all the benefits it can do thorribly irritating problems with working on Android, troubleshooting here.

Another thing which you may be interested is a some kind of a light effect, attached to a body, a mouse or anything.
I want to recommend you this tutorial. It’s also easy, just import the project, look into code and adjust it into your needs.
Minus – performance on Android devices.

I recorded my game in which I attached a light to the mouse.

One thought on “An easy entry to shaders with LibGDX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s