The Last Light: Shader Baker Optimization Tool

One of my jobs on this project was to optimize the lighting in every scene without noticeably affecting the visuals. To do this, I created a tool to bake the custom shaders of static object's into textures, gaining us a dramatic increase in performance.

One of my jobs on this project was to optimize the lighting in every scene without noticeably affecting the visuals. To do this, I created a tool to bake the custom shaders of static object's into textures, gaining us a dramatic increase in performance.

The unbaked visual development was generally composed of these 3 terms: Base Texture, stylized "Brushed Lighting" and the stylized lightmap. If needed, artists had the flexibility to tune the second two terms within each material.

The unbaked visual development was generally composed of these 3 terms: Base Texture, stylized "Brushed Lighting" and the stylized lightmap. If needed, artists had the flexibility to tune the second two terms within each material.

To achieve the same final blended look at a cheaper cost, I made a tool that generated delta textures. When these delta textures are combined with the base texture, it produces a final blend that is nearly identical to the original.

To achieve the same final blended look at a cheaper cost, I made a tool that generated delta textures. When these delta textures are combined with the base texture, it produces a final blend that is nearly identical to the original.

Visual comparison of "unbaked" and "baked" assets

Visual comparison of "unbaked" and "baked" assets

The tool UI. There are 2 main ways to use the tool: By selection and by controller. Using the bake controller allowed us save bake "instructions" and bake an entire scene's shaders in 5 minutes or less.

The tool UI. There are 2 main ways to use the tool: By selection and by controller. Using the bake controller allowed us save bake "instructions" and bake an entire scene's shaders in 5 minutes or less.

The Shader Bake Controller that held "instructions" on how to bake each scene. I created this class to save per-scene bake settings. I set these up initially and then shared info with the team on how to update and use it.

The Shader Bake Controller that held "instructions" on how to bake each scene. I created this class to save per-scene bake settings. I set these up initially and then shared info with the team on how to update and use it.

Each scene has a mixture of dynamic and static content. The Shader Baker tool was able to sift through the many objects in the scene and bake their complex shaders into simple textures, automatically replacing content and combining models when needed.