Hello everyone.

My university exams are finally over and I've been able to solely focus on WSW and Insomnia for the last week. I have finally gotten time to do the changes and additions that I've been wanting to do but haven't had time for due to school. There's been a lot of different changes that improve the quality of special effects, and optimizations for both high-end and low-end computers, but first I'd like to show a nice picture of what I've been working on the last few days.

Depth of field, the accurate bokeh kind, once again inspired by the clever folks behind the tech of Call of Duty: Advanced Warfare. This special effect will be featured in cutscenes only and will have a fairly high performance impact, but it'll hopefully make them look gorgeous. We're not planning on using it during actual gameplay. Sadly, I've hit a really annoying performance bug in the Nvidia shader compiler, and all my attempts at working around the bug has failed so far. It's funny and sad how I as an indie developer making my first engine have encountered more than 10 different bugs in different drivers so far.

Anyway, here's a quick (okay, maybe not that quick) rundown of some of the biggest changes.


 - TSRAA anti-aliasing got a big performance improvement and some small quality improvements.
 - Motion blur has had some bugs fixed, performance improved and blur quality improved.
 - Vignette effect (can be disabled).
 - Improved physics engine performance for complicated levels with many objects.
 - Much sharper and faster sun shadows.
 - The 3D model renderer is now better and faster at determining what to draw.
 - Grass has been updated with a physics simulation and certain attacks can disturb and move it.
 - Shared GPU buffer system improves performance a lot, mostly on older computers.
 - SSAO got itself some big quality and performance improvements.

The advanced TSRAA anti-aliasing system WSW uses has received a big performance improvement. The performance of 4x and 8x anti-aliasing is significantly better. In addition, TSRAA's interaction with transparent effects has also been improved meaning higher quality in some edge cases (pun intended).

Motion blur is closely integrated with TSRAA. It turns out that putting both motion blur and TSRAA, two complicated high-quality effects, in the same shader was too much for the compiler to handle leading to suboptimal performance. I've split up the two and moved the motion blur to a different shader allowing both TSRAA and motion blur to gain optimal performance. This gives even better performance when motion blur is enabled, and it now barely has a performance hit. I also fixed a bug that sometimes caused the motion blur shader to use a lower quality blur at times when that was a bad idea, leading to ugly little boxes on the screen. Finally, I bumped up the quality of the blur itself since the shader has so good performance now. In the end, both performance and quality are better than before.

An optional vignette effect has been added. Don't worry, you can disable it if you don't like it. =P

The physics engine got itself a performance upgrade. It now uses a better data structure to quickly determine which objects to test against which. This was something that was worrying me as it could limit our ability to have complicated levels and lots of units at the same time, but since the most performance critical parts of the physics engine are almost 70x faster now, this shouldn't be a problem anymore.

Sun shadows have been significantly improved with proper cascaded shadow mapping. That means sharper sun shadows at higher distances while at the same time giving better performance.

The 3D model rendering system now better takes the distance to the camera into account when determining what to draw. It's now significantly faster at discarding out-of-range models and avoiding doing work for objects that don't end up being rendered.

The grass has gotten a significant quality update. The grass is now based on a simple CPU-side physics, allowing for local disturbance of individual grass patches. Many special attacks and explosions now affect the grass around it. In addition, how the grass is disturbed and bent has been improved to reduce the amount of stretching and maintain the shape of the grass patches.

The most performance critical internal renderers have been upgraded to use a shared buffer system. Before, each camera and shadow map would reserve its own buffers from the graphics card to store data in, but now they all share one big buffer each frame instead. This means that the number of buffers Insomnia handles each frame has been reduced to a handful instead of hundreds while also reducing the overhead of each view. It suffices to say that performance is better, especially with older cards that couldn't handle lots of buffers as efficiently where the difference can be an almost 50% gain in some cases.

Insomnia's homegrown ambient occlusion effect (SSAO) has been upgraded with improvements inspired by Scalable Ambient Occlusion. The ambient occlusion is now done at four times the old resolution with a higher detection radius, better sample layout and more accurate blurring while still getting significantly better performance.