Added basic multithreading support, MSAA optimizations don't work for now