Tue, 12 Dec 2017

Anti Aliased Everything

pre-alpha 1750 devlog

TL;DR: fullscreen anti-aliasing for world rendering; good shadows via shadow volumes; improved distribution of snow; a few strange bugs keeping me from releasing the current build today.

Anti Aliasing

After adding anti-aliasing to the UI for the last release the non-anti-aliased rendering of the world view really bothered me. So while AA was a secondary objective for the renderer I moved its priority up, far enough, so that it is in the game now. It uses hardware based MSAA so it is quite resource demanding. On the other hand, it is the only way to make things look really good. i.e. small objects (of which there are many when zoomed out) might flicker in and out when they become sub-pixel sized. With MSAA they will mostly stay visible over multiple frames, getting rid of flickering geometry. A simple post processing effect like FXAA, SMAA &c. could not achieve the same thing. In short: yes it demands a fast GPU, but it produces the best looking result.

Shadow Volumes

Next I wrapped my head around how to implement shadow volumes on modern GPUs and without Geometry Shaders (since Metal has no GS stage). This was much messier than anticipated but I like the results. No heavily aliased shadows, no peter-panning, .. but sample accurate shadows. So if MSAA is activated, not only the geometry becomes anti aliased, but also the shadows.


One of the strange bugs I mentioned earlier, keeping me from releasing the current version, has to do with a Compute Shader for generating shadow volumes under Vulkan. After nearly 2 days of trying to find the source for its very erratic behaviour I start to think its an actual driver bug. Time to switch back to an nVidia GPU to see if it works there. While it does not tell much if it happens to work on an nVidia GPU since their drivers are normally much more lenient then AMD drivers, I at least know that it is my fault if it does not work on nVidia drivers either. So I hope it will be the latter.

(PS: Turns out it works on nVidia GPUs; too bad)


Finally I improved the way snow starts to distribute over the map. I think it looks much better now than the previous pixelated cow pattern.

End of Year

Anyway, this is the current update on the state of the game, without a new release of the current version. As I mentioned the last time, this would have been the last release for this year (resuming regular updates on the 9th of January). But since there is no release today, I might as well try to fix all the open bugs and push out another release before then.

Enable Javascript to see comments