Selective Bloom, Emissive Glow, Fake HDR - there's a number of ways to call this, but with Metric Racer being a sci-fi racing game, there was a need to make it look well, sci-fi-ish. What that meant was a lot of sharp corners, chamfered structures and a lot of bright neon colours that pop from the screen.

The Vertices Engine Architecture

Metric uses the Vertices Engine which uses a deferred rendering pipeline for its 3D graphics. The first pass involves drawing to 4 render targets at the same time:

1. Depth Map - High precision depth information

2. Normal Map - Surface normals for lighting

3. Distortion Map - For refraction effects

4. Surface Data Map - Specular, shadows, and emissive values

Selective Bloom

In a general bloom, the entire scene is used when extracting the bright portions. This can sometimes work well but often times gives a washed out or overly soft look to a scene.

For the emissive map though, when the bloom shader extracts the bright portions, it only does so for regions where the emissive map allows it to. This lets us perform a selective bloom which sort of 'fakes' an HDR look by letting us highlight certain area's of the screen and give the impression that certain area's are brighter or "glow".

Fine Tuning Options

Boolean Control

First, there's the boolean 'yes-no' for the full screen or emissive bloom.

Surface Maps

Then there's the emissive map, which comes from the alpha channel of the models surface condition map (which also holds the Specular power in the R channel, Spec Intensity in the G, and Reflection Amount in the B).

Per Object Factors

And finally, there's a per-object Emissive Glow Intensity factor in the shader which multiplies the emissive map value, allowing for items to pulse, hum or cycle their emissive values.

Pre-multiplied Alpha

Another option which gives different results is whether to apply pre-multiplied alpha to surface data texture map during the content build step. If pre-multiplied, RGB values are knocked out for the emissive area, meaning no specular or reflections pass through. Without pre-multiply, specular/reflection data passes through along with emissive data.

Results

This took almost no time at all to implement. After getting it working in the Vertices Test Bed, the results were evident immediately in Metric. Adding a center glow to the track helps lead the player around the course and adding an emissivity to the start of explosions gives a larger punch and emphasis to them.

This effect, while trivial in its implementation, has added greatly to the flexibility of Vertices and the final look of Metric.