This is a moderately fast two-pass gaussian blur implementation. It downscales the dynamically framebuffer before applying the gaussian shader, which cuts down rendering time quite considerably.
The blur shader takes 2 uniforms as input: the blur radius; and whether to blur vertically or horizontally.
The blur radius is treated as an integer in C land to simplify calculations. The vertical parameter is treated as an integer by the shader simply due to Cogl not having proper boolean support in snippets.
At last, brightness is also added to avoid needing to use an extra effect to achieve that. Brightness is applied in a different pipeline than blur, so we can control it more tightly.
Related: #1848 (closed)