HDR Shaders + Bloom

An implementation of HDR and bloom from scratch in OpenGL

Key Features

  • HDR
  • Bloom
  • Tone mapping
  • Toon outline shader
  • Dissolve shader

Description

This was my submission for a class project in CSCI 4611: Programming Graphics and Games, in which we were asked to implement Phong and cel shading. I took this a step further by also implementing an HDR and bloom solution from scratch in OpenGL. I then created custom dissolve and outline shaders to demonstrate the effect.

Explanation

HDR + bloom

To implement bloom, I utilized a floating point framebuffer which allowed for HDR color values greater than 1.0 to be written to it. From there, I rendered only those fragments with a brightness above a certain threshold to a separate texture, which was blurred using Gaussian blur, and then recombined with the original texture to undergo tone mapping and create the final image for that frame.

Dissolve Shader

In order to give objects the appearance of dissolving, I used a Perlin noise texture along with a variable threshold to determine which fragments to discard, coloring fragments close to that boundary with an especially bright color to allow bloom to come into full effect along the edges of the dissolved surface.

Demo

Outline and dissolve shader applied to a variety of models.

Tools Used

Languages: C++, GLSL

Software: MinGfx, OpenGL