VOIDBLADE


For VOIDBLADE, I worked as a Graphics Programmer, with my primary focus being advanced 2D lighting.


2D Lighting

VOIDBLADE is a stealth platformer, where your character can only be seen when they are in the light. As such, lighting was incredibly important.

Our requirements were as follows:

  • Needs to be fully dynamic, with a high level of control for level designers
  • Based on the sprites themselves, not handmade shadow casters
  • Shadows need to be cast from off-screen, so it can’t be screen-space
  • Extremely performant. Our min-spec was 60+ fps on a GTX 760

I decided to used Signed-Distance Field Shadows. This algorithm had a few steps:

  • Find a bounding box that contains all lights that will effect the visible scene
  • Render all shadow casting objects inside that bounding box to a render target
  • Use the Jump Flood Algorithm to create a texture that contains the UV value relative to the nearest surface, which can be used to get the distance to the nearest surface
  • Use this texture to raymarch from each light to the pixel being rendered, creating a lightmap for the bounding box
  • Sample this lightmap as a post processing effect

Jump Flood Algorithm

Calculated Light Map


Color Palette Tool

For our project, we did not have an artist. However, we still wanted a consistent and visually appealing art style.

To do this, we wanted the game to stick to a single color palette, grounding all of our sprites in the same visual style.

This palette is generated using an in-game widget, which allows for easy testing of a variety of different palettes, which can be instantly visualized in-game. This allowed us to playtest about a dozen different palettes, and get feedback on which palette people preferred.

The palette is a gradient in the Oklab Color Space which creates appealing gradients by being perceptually accurate, meaning that the perceived brightness stays the same as the hue and saturation is changed.