Using Command Buffers in Unity: Selective Bloom

What this tutorial will cover

This is going to be a pretty big tutorial that’s going to cover how to use command buffers in Unity for graphical effects that require extending the graphics pipeline. I’m going to illustrate the concept by explaining how I built the system that creates this selective bloom effect.

The glowing effect in this tutorial is pretty boring, since the glow is a single solid color. I challenge you to modify the glow buffer step to actually render the model or utilize a custom emission map per-object… the possibilities are endless! The possibilities of what could be contained in this tutorial, however, are finite, so that’s why we’re focusing on this solid color glow.

Credit goes to Unity’s example project for command buffers, especially the one on decals, for helping me figure out how to utilize command buffers.

What you need to start

You’ll need some basic knowledge about how Unity’s rendering pipeline works, and what rendering pipelines do in general. I also recommend you check out Unity’s basic overview of command buffers┬ábefore reading this.

You definitely also need to have some experience writing basic shaders. This blog is full of tutorials on shader writing that I strongly recommend you check out before diving into this one ;0

I also strongly recommend that you reference┬áthe Unity project on GitHub for this tutorial, as it completely implements everything we’re about to cover!

Continue reading Using Command Buffers in Unity: Selective Bloom

Advertisements