GLSL Post-Processing Effect Framework

Introduction

The SoPostEffectRenderer module and its extensions provides a framework for screen-space post-processing effects using GLSL shaders.

It offers:

  • Configurable super-sampling anti-aliasing
  • Anti-aliasing as a post-processing step (instead of MSAA)
  • Rendering of various effects (e.g. glow, edges, screen space ambient occlusion, …)
  • Custom shaders/buffers to build own effects

How to use

The SoPostEffectRenderer module collects all extensions that are in front of it and renders all effects in the order in which they have been placed into the scene. After applying all effects, it renders the buffers name “colorBuffer” and “depthBuffer” to the default Open Inventor framebuffer.

The order of the effects is important, for instance it only makes sense to do anti-aliasing as one of the last effects, otherwise you will get aliased effects on top of the anti-aliased color buffer. The same applies to SoPostEffectAmbientOcclusion, it should be applied after the main geometry pass and not after any transparent geometry that is rendered on top.

PostEffectRenderer Macro Module

The PostEffectRenderer macro module combines the typically used extensions into a default post effect renderer, which can be extended with additional effects. It is not required to use this macro module, it merely provides an easier starting point to the post effect framework.

Effect Extensions

Building custom effects

The main module for building of custom effects is the SoPostEffectCustomPass module. It can have an arbitrary number of input buffers and writes/blends the results to an output buffer. In addition to that, there are various modules that allow to work with buffers to e.g. copy, downsample and blur them.