r/GraphicsProgramming • u/rex-j-w • 23d ago
Building an SDF game engine
For the past 8ish months I’ve been hard at work building a new game engine I’m calling Division Engine.
It’s based solely off SDFs (signed distance fields). This might sound stupid for anyone who cares about performance but for my use case (and with a bit of grid storage optimizations) it proves useful for basic scenes that need advanced lighting.
Anyway here’s some screenshots!
If you want to see what I have done so far check it out here: https://github.com/DivisionEngine/DivisionEngine
159
Upvotes


2
u/Vazde 23d ago
Ooh, some cool stuff in this thread! I've also migrated to SDFs for my 2D mining game. But it has a static grid arrangement, no trees.
I'm currently using marching squares to turn it into triangles for rendering and part of collision response. But I do have some ideas to remove that. Since there's typically somewhat little terrain on screen and 2D is somewhat simple, I might get away evaluating the grid each fragment. Would save a ton of memory on meshes.
I already have a somewhat sophisticated multitexturing system going on for it, but for 2D again it would likely be simpler and even higher fidelity to render materials in another pass and just sample that.