Changed float to double, which reduces artifacts