Hey, guys.

Due to my lack of time, this week was limited to small optimizations here and there, mostly triggered by the release of a 166 page PowerPoint presentation by the developers of Call of Duty: Advanced Warfare, which focused on the improvements they've made to the post processing of CoD, which I have to admit are pretty damn impressive.



Motion blur has received a much improved brand new next-gen algorithm based on the one used in Call of Duty: Advanced Warfare. Objects in motion are blurred much more accurately with more correct blur weighting, eliminating the sharp edge that was visible at times. The new algorithm is also around 94% faster. I fixed a number of visual artifacts introduced by the new algorithm, the most glaring problem being a clearly visible line that appeared along edges when combined with TSRAA. In addition, I added an optimization that checks what parts of the screen that actually need the complete motion blur algorithm that can handle difficult overlapping motion and sharp edges in front of objects in motion etc. The majority of the scene does not usually need this, so for these parts a simpler algorithm is used instead. This resulted in yet another 88% performance increase. Compared to the old motion blur algorithm, the new one is approximately 275% faster (!!!) during fullscreen motion, meaning that motion blur no longer cuts your FPS by a large amount when the camera starts moving.

The TSRAA shader also got some love this week. I identified some rather simple bottlenecks that especially slowed down the shader when using a high number of samples as they tricked the compiler into generating very inefficient code, and reworked those parts. This resulted in a massive 132% performance boost for 8xTSRAA, while 4xTSRAA saw a much smaller 10% boost.

Another post processing effect that the CoD slides mentioned was bloom. Thanks to some tips and tricks there, I managed to halve the VRAM usage and increase performance by 13% with just a few simple changes. In addition, as I was looking through the bloom shaders, I noticed a typo which was accidentally making the bloom flicker more than it should. I fixed that and also added more anti-flickering counter measures.

On the CPU side, I worked together with Brayden in an attempt to improve performance of the game logic. We realized that we were doing some redundant updating in the main logic loop, which turned out to account for around 40% of the time it took to run each update. This change will mostly affect slower computers that are limited by their CPUs when there are a significant number of AI enemies around, but in those cases it can increase your frame rate by over 60%.

Finally, shadow filtering was also mentioned in the CoD slides. Although their shadow filtering was not faster or better looking, it was more flexible, so instead of an on-off switch for shadow filtering, we now have a off-low-medium-high quality setting.



That's all for now. As you can see, these cumulative optimizations actually had a surprisingly large impact on overall performance. The reduced performance requirements of some of our more advanced graphics effects improves performance a lot for high-end graphics cards while also making it possible for weaker hardware to enable them, while our CPU optimizations mostly reduce the minimum CPU requirement to get smooth frame rates.