Skip to content

14 June 2024 - Pixel Art Shadows

<<< Previous Post Next Post >>>


  If you look at the previous blog post about terrain rendering you will see that the shadow there is really sharp. It doesn't match the pixel art aesthetic at all!

  Well, lucky for you, a new Godot feature could not have better timing. Using this new feature, I am able to snap shadows to pixels!

An image of blocks surrounding a floating light source, casting shadows. The shadows match the pixel art aesthetic of the voxels, lining up perfectly with their textures.

  Unfortunately, there is a nasty bug that I can't really figure out where sloped surfaces get all sorts of horrible artifacts. This doesn't bode well for higher poly prop models that I plan to include in the game. Look here:

An image of a sloped, triangular pile of dirt. The shadows which are supposed to align to pixels have been calculated improperly, resulting in triangle shaped light spots being scattered across its surface facing the viewer.