Firefly in the Dusk🌙

DuskEngine Devlog 7 - Linux Build, PBR and More Edition

It's mostly engine dev that happened this past month. Here's a tour of it all.

Linux build on Steam Deck

Picture of the engine running on Steam Deck

Pic so it did happen.

Taking advantage of the recent switch to cmake, DuskEngine can now build on Linux (again), and I used my Steam Deck for it. The goal here was to test how the engine behaves on an AMD GPU more than the Linux part itself, because all these years it has only been run on nVidia (and Mac).

Luckily everything went great and there were no renderer issues to speak of other than the fact that NV_fragment_shader_barycentric wasn't usable, so I had to provide alternative shaders for wireframe rendering. The code using this extension is very old, I'm not sure it's really necessary anyway, but this refactoring I'll leave for later.

It turns out the Deck's own SteamOS is not a great platform for development because OS updates will wipe away any changes such as package installations. But you can make it work using Distrobox like so. I used BoxBuddy on top of it and created an Arch Linux instance to do the devving on.

Because the home folder gets shared between the guest and the host the process was straightforward; I was able to download CLion and pull my repo on the host (I wonder why Git was pre-installed on the Deck? Probably used in some way during updates...), open a terminal on the guest and pacman away and run CLion.

It's been a very pleasant experience. Unlike the experience of trying to figure out cmake and building some of my dependencies, but whatever. Big props to Boost though, which despite being a large and complex library, took no effort at all to get going with cmake.

The whole process took around 3 days or so, starting with updating the cmakelists to not use hardcoded (local to my Windows machine) dependency paths anymore, all the way to successfully running the engine on Deck.

I will do my best to regularly make Linux builds, the same way I make Mac builds.

PBR support

The engine used Blinn-Phong shading up until now, but in the hopes that PBR will help make things like the material clothing is made of more interesting, I've decided to begin a switch to it this month.

It's more or less just roughness maps that are useful for now, I will implement IBL & metallic maps sometime later.

Picture showing specular reflections

Cool specular highlights caused by the roughness maps.

Vertex Animation Textures

I've added support for VATs, using the format and Blender plugin of OpenVAT. Their Godot sample shaders were the starting point for my OpenGL implementation.

Because OpenVAT outputs a separate set of UVs when baking the animations (it outputs both mesh and texture), I had to add support for an additional mesh UV set to the engine.

I have high hopes for animations using VATs in the future, because their low performance cost is attractive.

Gif showing a glowing sword

At the moment the only thing using VATs is the glow effect on this sword.

Other stuff

Extracted a separate Armature asset type, so multiple meshes can share the same armature.

Switched to the docking branch of imgui because I got tired of moving windows around all the time.

The engine now interpolates physics object state between fixed updates, so the gameplay appears smooth at any framerate. The animation system still needs interpolation implemented, for those entities that are set to animate in fixed update.

That's all for this devlog, see you in the next one.

Btw, check out this video of a NPC playing guitar and the player joining them.


For any questions or feedback, find me on Bluesky
Firefly in the Dusk🌙