Skip to content

Instantly share code, notes, and snippets.

@Groogy
Created March 3, 2013 19:00
Show Gist options
  • Save Groogy/5077647 to your computer and use it in GitHub Desktop.
Save Groogy/5077647 to your computer and use it in GitHub Desktop.
World::doPostProcessing()
{
// The different steps/techniques for bloom, first argument input, second output
mPostRenderer.apply(Shaders::BrightnessPass, mSceneTexture, mBrightnessTexture);
mPostRenderer.apply(Shaders::DownSample, mBrightnessTexture, mBloomTexture1);
mPostRenderer.apply(Shaders::GuassianBlurVertical, mBloomTexture1, mBloomTexture2);
mPostRenderer.apply(Shaders::GuassianBlurHorizontal, mBloomTexture2, mBloomTexture1);
mPostRenderer.apply(Shaders::GuassianBlurVertical, mBloomTexture1, mBloomTexture2);
mPostRenderer.apply(Shaders::GuassianBlurHorizontal, mBloomTexture2, mBloomTexture1);
// This one has two input and the last is output
mPostRenderer.apply(Shaders::Add, mBloomTexture1, mSceneTexture, mWindow);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment