Skip to content

Instantly share code, notes, and snippets.

@bitbrain
Created February 8, 2014 11:40
Show Gist options
  • Save bitbrain/8882474 to your computer and use it in GitHub Desktop.
Save bitbrain/8882474 to your computer and use it in GitHub Desktop.
// Create a new shader manager
ShaderManager shaderManager = new ShaderManager();
// Create shaders
BlurShader blurShader = new BlurShader();
CRTShader crtShader = new CRTShader();
// Add them to the manager in a layer-based way. At first, the blur shader is applied and so on.
shaderManager.add(this, blurShader, crtShader);
/* ... */
// In the resize method:
shaderManager.resize(width, height);
// In the render method:
shaderManager.updateAndRender(batch, delta);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment