Hey, everyone.

Apologies for the late post. It's the last week before my exams, so sadly I haven't had much time to work on Insomnia. Most of the time I did spend on Insomnia went into bug fixing the new anti-aliasing and other parts of the engine.

I've modified how the engine stores motion vectors. Before, the engine stored the motion vectors as normalized values, which means they were stored as a percentage of the screen resolution, so a movement of 1 pixel to the right at 1920x1080 was stored as 1/1920. Now it stores them in actual pixels. This has a number of advantages. First of all, the precision does not depend on resolution, which caused problems at extremely high resolutions. At 7680x1440 (3 monitors >__>) I noticed a significant degradation in motion blur quality because of that. Secondly, it's actually very slightly faster, as the motion vectors were converted to pixel values in the end anyway, so this saves a few operations later.

TSRAA got a few bug fixes and improvements as well. A few temporal reprojection (=estimating where the triangle was in the previous frame using the previously mentioned motion vectors) bugs that reduced quality in motion have been fixed. I've also added a new ghosting prevention system which disables the temporal component for parts of the scene that are in fast motion. This turned out to actually provide a significant performance improvement when the scene is in motion as I skip quite a bit of work there. When paired with motion blur, any remaining aliasing is handled by the motion blur, so this shifts some freed up resources from unnoticeable anti-aliasing over to motion blur which only activates during fast motion. A win-win, as they say.

In addition, we've been getting some quite sneaky problems when utilizing multiple CPU cores in the engine, and I've been doing quite a bit of investigating into what's causing it. I still haven't figured out exactly what the cause is, but I have rewritten and simplified the threading system to reduce the chance of bugs and hopefully fix the problem. So far the bug has yet to appear again, but these kinds of bugs are hard to debug, as they happen randomly due to the timings and distribution of tasks over CPU cores, which is up to the OS to decide. Nothing we can't handle though. =3

That's all for this week. Next week I thought I'd write a more in-depth rant about how Insomnia's threading system works and how it allows the engine to utilize any number of CPU cores for almost linear scaling of the parts of the game that Insomnia takes care of.