Experimenting with Unity 5

Unity 5 has added some really cool lighting and shader features to help artists create more realistic looking scenes. A lot of this is coupled to their out of the box set-up, but it is pretty easy with Unity to write new shaders that take advantage of this new lighting model.

RedFrame has traditionally not made much use of of specular lighting because it required using dynamic lights to add the spec highlights. This slows things down a bit since the scenes have hundreds of thousands of polygons. However it seems like using Unity’s reflection probes is pretty cheap and can help mimic all sorts of real surface types.

As an experiment, I wrote a shader that takes the light map as the diffuse contribution but also has specular and occlusion maps that can interact with box-projected reflection probes. The below video shows the library using this technique on some of the surfaces. There is one dynamic point light in the center of the room to add some more vivid spec highlights, but this is running at a few hundred frames per second with 8x anti-aliasing, so it is a good sign.