Online turn based card game

An online card game made for DirectX12 and Playstation 4 in a cross-platform custom engine. I wrote and maintained the renderer on PS4 and added post-processing effects like bloom and a vignette. The models itself were hand-painted by the artists and therefore flat shaded. I wasn't able to participate on this project full-time, but the project lasted for 8 weeks.

Implementing Bloom

The assets in our game were going to be hand-painted, this means that the lighting information is embedded in the textures by artists and therefore it became impossible to use the brightness of the objects to determine where the bloom effect is going to be applied. We decided to go for this approach because there was a very limited amount of time to develop our engine and we had a reasonably big art team (7 people).

To solve this problem we decided to add additional textures to models that were going to determine if and how the bloom effect is going to be applied. In a first pass using MRT, I render the geometry with these textures in a separate buffer. This image then needed to be blurred, and I decided to go for using a two-pass Gaussian blur implementation using ping-pong framebuffers. This two-pass implementation drastically reduces the number of samples required and achieves the exact same result. This can easily be proven by a simple example, imagine blurring each pixel in a 32x32 pixel area. This then requires then 32x32 =1024 samples for each pixel. when only blurring the texture on one axis and then blurring the result on the other axis it becomes 32 + 32 = 64 samples.

This was still relatively expensive when applied to the entire screen and could be furtherly optimized by blurring different mipmaps and blending them together. These mipmaps can then later be blended back together, this causes the outer edges to be less detailed but since the edges become less visible the result will still look good. I received the desired effect shown above using 6 mipmaps and a 5x5 blur area per pixel.

All blurred mipmaps are then sent to a final full-screen pass where they are sampled and combined with weights to achieve a more blurred result.