GameDev

Super Basic SDFs

4 minute read

A bunch of shapes generated using SDFs

In a recent experimental 2D gamedev project, I wanted to play around with drawing a bunch of game entities purely algorithmically rather than creating sprites for each of them. One important technique I ended up using was Signed Distance Fields (SDFs). In this post, I’ll go over the most basic implementation (we’ll draw a circle!) and explain how and why it works.

Read 1,277 more words...